我正在尝试在Windows傀儡代理上安装App。我有以下配置:
我使用以下清单来确保App已安装:
# This is the init.pp manifest file for the appfabric module
class appfabric {
# TODO: Get the setup path from Hiera
$setup_base_directory = 'D:/Setups/'
$setup_path = "${setup_base_directory}WindowsServerAppFabricSetup_x64.exe"
$hotfix_path = "${setup_base_directory}AppFabric1.1-KB2932678-x64-ENU.exe"
# Pull down the setup of AppFabric
file {$setup_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/WindowsServerAppFabricSetup_x64.exe',
}
->
# Pull down the setup of hotfix update 5
file {$hotfix_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/AppFabric1.1-KB2932678-x64-ENU.exe',
}
->
# Install AppFabric 1.1
package {'AppFabric 1.1 for Windows Server':
ensure => present,
source => $setup_path,
install_options => ['/i','/SkipUpdates'],
}
->
# Install Hotfix KB2932678
package {'AppFabric 1.1 HotFix install':
ensure => present,
source => $hotfix_path,
install_options => ['/q','/norestart'],
}
->
# Start the remote registry service
service {'Remote Registry Service':
ensure => running,
name => 'RemoteRegistry',
enable => true,
}
->
# Start the app fabric service
service {'App Fabric Service':
ensure => running,
name => 'AppFabricCachingService',
enable => true,
}
}我所面对的问题如下:
AppFabricCachingService的登录用户更改为NT Authority\System (本地系统帐户)或任何其他特定用户。puppet agent --test时,木偶每次都尝试安装App 。我试图编写清单,我可以确保万一App已经安装,那么木偶不应该尝试重新安装。我是新的木偶配置管理和任何帮助将是伟大的。
提前谢谢。
发布于 2015-09-12 18:54:35
对于第二个问题,请确保包的名称(在您的示例中是指定“Windows1.1forWindowsServer”)与Windows \Remove程序菜单中出现的名称匹配。否则木偶每次都会重新安装。
您可能想看看Windows上的软件包文档页面。
根据这一页:
确定包的DisplayName的最简单方法是:
如果您正在安装的软件没有显示在程序列表中,我建议您不要使用package。相反,使用exec安装它,并添加一个creates子句来运行安装程序,只在没有找到属于该软件的特定位置的文件,或者使用unless执行免费形式的检查(注册表、尝试执行软件和检查版本等)。
https://stackoverflow.com/questions/32537343
复制相似问题