【发布时间】:2014-08-31 02:31:39
【问题描述】:
我在ansible中有以下任务:
- file: "state=directory path=/servers/repo"
sudo: yes
name: "Create the base site directory."
它应该以我的用户身份运行,但具有 root 权限。但即使我的用户是 sudoer,它也会失败并显示
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 时,我拥有所有正确的权限,但不知何故,它无法正常工作。
知道为什么吗?
【问题讨论】:
标签: linux ubuntu-12.04 ansible ansible-playbook