[英]How to uninstall the exe file running in windows client from puppet manifest
如何使用puppet卸载在Windows客户端上运行的.exe文件?
即。
package { "WinRAR":
ensure => absent,
}
按照@ ferventcoder的回答,调用最新版本的winrar :
“WinRAR 5.21 beta 2(64位)”
所以这会卸载它:
package { 'WinRAR 5.21 beta 2 (64-bit)':
ensure => absent,
uninstall_options => ['/S'], #stops the prompt from coming up
}
它的一个例子:
您应该查看官方文档,这在这方面非常有用。
https://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html和https://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html#package-name-must-be-the-显示名称
从上面的内容可以看出,对于Puppet,您需要查看报告ARP(添加/删除程序) DisplayName
名称的内容。 一个简单的
puppet resource package
应该帮助您获得需要添加到标题的正确名称(它可能不仅仅是WinRAR)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.