简体   繁体   English

无法从puppet运行命令以使用puppet enterprise更新puppet代理的服务器

[英]cannot run command from puppet to update servers for puppet agent using puppet enterprise

I can run almost every other command via Puppet Enterprise Master to Agent, but the update command will not run. 我可以通过Puppet Enterprise Master到Agent运行几乎所有其他命令,但是update命令将无法运行。 PE does run as root as far as I know. 据我所知,PE确实是作为root运行的。

Can someone please suggest how to get this command working on Linux from Puppet. 有人可以建议如何从Puppet在Linux上使用此命令。

exec { "sudocmd" :
        cwd => "/usr/bin/",
        path => ["/usr/bin/","/usr/sbin/","/bin"],
    command => "yum update -y",
    timeout => "-1",
    logoutput => "on_failure",
     }

以root用户身份运行puppet agent(据我所知是一种常见的做法),或者在yum上添加suid以允许其他人以root用户身份运行(风险!),或者运行“ sudo yum update -y”并添加您的puppet agent用户提示没有密码提示的用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM