【发布时间】:2016-07-06 07:11:20
【问题描述】:
只有当exec['get-chocolatey'] 完成并成功时,我如何才能让包执行?现在,包试图在 exec 命令之前执行,因此失败并显示错误
Chocolatey 在节点上不起作用
我不明白为什么 'require' 在这里不起作用。
exec { 'get-chocolatey':
path => 'C:\Windows\system32\WindowsPowerShell\v1.0',
command => 'Powershell.exe "Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression"',
refreshonly => true,
logoutput => true
}
package { 'webpi':
provider => 'chocolatey',
ensure => latest,
require => Exec['get-chocolatey']
}
package { 'redis-64':
provider => 'chocolatey',
ensure => latest,
require => Exec['get-chocolatey']
}
【问题讨论】:
-
请添加运行 Puppet 的日志(最好使用 --debug)以显示您所描述的问题。
标签: package exec puppet chocolatey