我已经编写了清单,安装.exe并每次在新机器上安装时都会对其应用修补程序。
windowsinstaller { 'AppFabric install 1.1 install':
software_title => 'AppFabric 1.1 for Windows Server',
software_path => '/Microsoft/AppFabric1.1/WindowsServerAppFabricSetup_x64.exe',
install_options => ['/i','/SkipUpdates'],
}
windowsinstaller { 'AppFabric 1.1 HotFix install':
software_title => 'Windows Server AppFabric v1.1 CU5 [KB2932678]',
software_path => '/Microsoft/AppFabric1.1/AppFabric1.1-KB2932678-x64-ENU.exe',
install_options => ['/q','/norestart'],
subscribe => Windowsinstaller['AppFabric install 1.1 install']
}
service { 'Remote Registry Service':
name => 'RemoteRegistry',
ensure => running,
restart => true,
} 我试图让这个安装只有在没有注册表项的情况下才能运行。
使用傀儡实验室注册模块,您可以管理密钥,重定向它们,并更改值。
参考:http://puppetlabs.com/blog/module-of-the-week-puppetlabs-registry-windows
不幸的是,我似乎找不到一种方法来简单地检查密钥是否在那里,我可以删除它,或者使用ensure => present和ensure => absent来确保它的存在。
由于我无法将资源放入变量中,所以我发现很难使用条件语句,而且由于present和absent设置了键而不是检查它,所以我认为不能在registry_key资源中使用元参数。
我知道我可以用if语句包装所有东西,并使用自定义的事实,但是我被告知这不是正确的方法。
如果任何人在使用这个模块或在木偶锻造中注册的其他东西或任何想法之前都有这样做的例子,那么我们将不胜感激。
发布于 2014-11-12 14:45:39
https://stackoverflow.com/questions/25886868
复制相似问题