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