ansible ws -m "shell" -a "echo 'wangsong ALL=(ALL) NOPASSWD: /usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/bin/vim, /bin/vi' >>/etc/sudoers" ansible ws -m "shell" -a "echo 'zhangyi ALL=(ALL) NOPASSWD: /usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/bin/vim, /bin/vi' >>/etc/sudoers" ansible ws -m "shell" -a "echo 'Cmnd_Alias kfcj =/usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep' >>/etc/sudoers" ansible ws -m "shell" -a "echo 'Cmnd_Alias kfcj =/usr/local/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep' >>/etc/sudoers" ================ ansible ws -m "shell" -a "echo 'Cmnd_Alias KFQX =/usr/local/bin/supervisorctl, /usr/bin/supervisorctl, /bin/cat, /bin/ls, /usr/bin/head, /usr/bin/tail, /bin/grep, /usr/local/php/bin/php, /usr/bin/crontab, /usr/bin/python2.7, /usr/bin/python, /usr/bin/python3, /usr/bin/svn' >>/etc/sudoers" ansible ws -m "shell" -a "sed -i 's#/usr/bin/svn#/usr/bin/svn, /usr/bin/vim, /bin/vi, /etc/init.d/crond#g' /etc/sudoers"
/usr/local/bin/supervisorctl,
/usr/bin/supervisorctl,
/bin/cat,
/bin/ls,
/usr/bin/head,
/usr/bin/tail,
/bin/grep,
/usr/local/php/bin/php,
/usr/bin/crontab,
/usr/bin/python2.7,
/usr/bin/python,
/usr/bin/python3,
/usr/bin/svn
/usr/bin/vim, /bin/vi, ====这个保留比较危险
/etc/init.d/crond
/bin/cp
/bin/mv