這是我的清單看起來像:相關性錯誤,同時運行windowsfeature
class dotNetCore
{
notify { 'Installing NET-Framework-Core': }
windowsfeature { 'NET-Framework-Core': }
notify { 'Finished Installing NET-Framework-Core': }
}
class installIIS{
require dotNetCore
notify { 'Installing IIS': }
windowsfeature { 'IIS':
feature_name => [
'Web-Server',
'Web-WebServer',
'Web-Asp-Net45',
'Web-ISAPI-Ext',
'Web-ISAPI-Filter',
'NET-Framework-45-ASPNET',
'WAS-NET-Environment',
'Web-Http-Redirect',
'Web-Filtering',
'Web-Mgmt-Console',
'Web-Mgmt-Tools'
]
}
notify { 'Finished Installing IIS': }
}
class serviceW3SVC {
require installIIS
notify { 'Setting serviceW3SVC': }
service { 'W3SVC':
ensure => 'running',
enable => 'true',
}
notify { 'Finished Setting serviceW3SVC': }
}
class stopDefaultWebsite
{
require serviceW3SVC
notify { 'Stopping Default Web Site': }
iis::manage_site_state { 'Default Web Site':
ensure => 'stopped',
site_name => 'Default Web Site'
}
notify { 'Finished Stopping Default Web Site': }
}
class includecoreandiis
{
contain dotNetCore
contain installIIS
contain serviceW3SVC
contain stopDefaultWebsite
}
在代理節點,我得到相關性錯誤在事件查看器:
Failed to apply catalog: Parameter provider failed on Exec[add-feature-NET-Framework-Core]: Invalid exec provider 'powershell' at /etc/puppetlabs/puppet/environments/production/modules/windowsfeature/manifests/init.pp:111
Wrapped exception:
Invalid exec provider 'powershell'
重新啓動Puppet Agent
後服務在幾次客戶機節點上,它會獲取其餘文件並且它可以工作。
如何在安裝提及的Windows功能之前等待所有必需的文件被下載?
從來沒有使用木偶的窗戶,所以我不能做出完整的答案。但是在這種情況下成功部署的關鍵是'需要'塊。您告訴某些資源需要其他資源。 –