gpt4 book ai didi

linux - 无法使用 Puppet Enterprise 从 Puppet 运行命令来更新 Puppet Agent 的服务器

转载 作者:太空宇宙 更新时间:2023-11-04 04:02:29 27 4
gpt4 key购买 nike

我可以通过 Puppet Enterprise Master 到 Agent 运行几乎所有其他命令,但更新命令不会运行。据我所知,PE确实以root身份运行。

有人可以建议如何让这个命令在 Linux 上从 Puppet 运行吗?

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

最佳答案

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

关于linux - 无法使用 Puppet Enterprise 从 Puppet 运行命令来更新 Puppet Agent 的服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22510706/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com