以下任务在Vagrant (ubuntu12.04 chefless) http://opscode.github.io/bento/上失败
- name: ensure database is created
postgresql_db: name={{dbname}}
sudo_user: postgresfd
failed: [192.168.78.8] => {"failed": true, "parsed": false}
invalid output was: Sorry, user vagrant is not allowed to execute '/bin/sh -c echo SUDO-SUCCESS-lalargtagydzinzenmftocwaiucrmxuk; /usr/bin/python /tmp/ansible-1392568385.89-150322815243790/postgresql_db' as postgres on cogol-dev.我需要创建自己的盒子吗?
/etc/sudoer的===含量
Defaults env_reset
Defaults exempt_group=sudo
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=NOPASSWD:ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d发布于 2014-05-22 00:36:59
可能要迟到了,但我今天遇到了同样的错误,并用
username ALL=(ALL) NOPASSWD: ALL您的sudo组在括号中缺少此ALL
发布于 2014-02-17 03:23:45
非常肯定您还必须将sudo: yes添加到sudo_user参数下面/之上。
https://stackoverflow.com/questions/21814361
复制相似问题