0

This is how my manifest looks like:

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
}

On the agent node, i am getting dependency error in the event viewer:

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'

After restarting the Puppet Agent service on the client node couple of times, it fetches the rest of the files and it works.

How do i make it wait for all the required files to be downloaded before installing the mentioned windows features?

Asdfg
  • 11,362
  • 24
  • 98
  • 175
  • Never used puppet for windows, so I cannot make complete answer. But the key for successful deploy in such cases are 'require' blocks. You tell that some resource is requiring some other resource to be present. – Oleg S Kleshchook Oct 16 '15 at 19:04

1 Answers1

0

You need to install the PowerShell provider module.

Additionally you may want to look at the windowsfeature module and anything that is available in the puppetlabs/windows module pack.

Sounds like a plugin sync issue after rereading, plus waiting for a suitable provider.

ferventcoder
  • 11,952
  • 3
  • 57
  • 90