我在ansible以下任务:获取root权限在ansible
- file: "state=directory path=/servers/repo"
sudo: yes
name: "Create the base site directory."
这应该作为我的用户,但以root权限运行。但是,即使我的用户是
Sorry, user sofiab is not allowed to execute '/bin/sh -c echo SUDO-SUCCESS-amlzcqzchzpjsgkllckjhjfednpjgevj; LANG=C LC_CTYPE=C /usr/bin/python /home/sofiab/.ansible/tmp/ansible-tmp-1409321488.66-202796192861545/file; rm -rf /home/sofiab/.ansible/tmp/ansible-tmp-1409321488.66-202796192861545/ >/dev/null 2>&1' as root
当然,当我在服务器上执行sudo -s
我拥有所有正确的权限,但不知何故与ansible它不工作一sudoer失败。
任何想法为什么?
是的,的确如此。我没有使用/ bin/sh的权限,但是我不能将它添加到sudoers文件中(这是一家大公司,这不是我的决定),所以只是将shell修改为ansible的配置文件。 – Sofia 2014-08-30 18:33:41