0

這是我的清單看起來像:相關性錯誤,同時運行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功能之前等待所有必需的文件被下載?

+0

從來沒有使用木偶的窗戶,所以我不能做出完整的答案。但是在這種情況下成功部署的關鍵是'需要'塊。您告訴某些資源需要其他資源。 –

回答

0

您需要安裝PowerShell提供程序模塊。

此外,你可能想看看windowsfeature模塊和puppetlabs/windows模塊包中可用的任何東西。

聽起來像重讀後的插件同步問題,再加上等待合適的提供商。

+0

問題在於代理版本。 – Asdfg

+0

啊對了。對不起,最初的簡短答案。希望能爲你提供一些你可以使用的東西。 – ferventcoder