运行Windows功能时出现依赖性错误

时间:2015-10-16 13:15:34

标签: windows manifest puppet windows-server-2012-r2 puppet-enterprise

这就是我的清单的样子:

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功能之前等待所有必需的文件下载?

1 个答案:

答案 0 :(得分:0)

您需要安装PowerShell提供程序模块。

此外,您可能需要查看windowsfeature模块以及puppetlabs / windows模块包中可用的任何内容。

重读后听起来像插件同步问题,再等待合适的提供商。