Ask Your Question
0

Error: Could not find a suitable provider for dsc_windowsfeature

asked 2016-02-02 06:54:12 -0500

ak1001 gravatar image

updated 2016-02-02 16:34:03 -0500

GregLarkin gravatar image

My Puppet server is on centos 7.0

The Node is a windows 21012 r2 where I have powershell 4.o installed I downloaded a zip file for the dsc resource kit from https://gallery.technet.microsoft.com... and exploded it to the modules directory C:\Program Files (x86)\WindowsPowerShell\Modules

I run

puppet agent -t

and i get the following error

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppetclient1
Info: Applying configuration version '1454351165'
Notice: /Stage[main]/Bbb_web::Iis/Service[W3SVC]: Dependency Dsc_windowsfeature[IIS] has failures: true
Warning: /Stage[main]/Bbb_web::Iis/Service[W3SVC]: Skipping because of failed dependencies
Error: Could not find a suitable provider for dsc_windowsfeature
Error: Could not find a suitable provider for dsc_xwebsite
Notice: Finished catalog run in 1.24 seconds
PS C:\Users\pptclient1>

The code snippet for the class file is as follows

 class bbb_web::iis {

    dsc_windowsfeature {'IIS':
        dsc_ensure => 'present',
        dsc_name   => 'Web-Server',
    }->
    service { 'W3SVC':
        ensure  => 'running',
        enable  => 'true',
    }

I tried including the provider and I still get errors though was not sure what the correct provider is. I used powershell and then windows and neither of them worked.

Does anyone know how to solve this?

Thanks

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2016-02-02 10:55:24 -0500

You do not have to download the PowerShell DSC Resource Kit yourself, the Puppet DSC module already contains them for you. You do need to install the Puppet DSC module on your Puppet server and the server will then copy down the module to your agents. You mention you are running this on PowerShell 4 on your target server, we need PowerShell v5 installed in order for the integration points to be present for the Puppet DSC module to work.

So in summary:

  1. Delete the DSC Resource Kit from the C:\Program Files (x86)\WindowsPowerShell\Modules directory on the target node
  2. Install WMF5 [1] on the target node
  3. Install the Puppet DSC module on your server by running 'puppet module install puppetlabs-dsc
  4. Run the manifest again

We at Puppet pride ourselves on our documentation. Could you please let us know where you got the information you listed above? Also if the read at https://forge.puppetlabs.com/puppetla... helps with using this module.

[1] Note that if you are using Chocolately to install software on windows you can install WMF5 in your manifest by adding:

package { 'powershell': ensure => latest, provider => 'chocolatey', install_options => ['-pre'], }

edit flag offensive delete link more
0

answered 2016-10-07 10:03:26 -0500

pyoung gravatar image
I'm getting "Error: Could not find a suitable provider for dsc_registery" on a win7 machine.
server is centos 7, puppetserver 2.6, puppet agent is 1.7
class win7 {`dsc_registry {'proxyon':
      dsc_ensure    => 'Present',
      dsc_key       => 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings',
      dsc_valuename => 'ProxyEnable',
      dsc_valuedata => '1',
      dsc_valuetype => 'Dword',
  }
}

my module list is:
/etc/puppetlabs/code/environments/production/modules
├── phil-hello_world (v0.1.0)
├── phil-win7 (v0.1.0)
├── puppetlabs-dsc (v1.1.0)
├── puppetlabs-powershell (v2.0.3)
├── puppetlabs-reboot (v1.2.1)
└── puppetlabs-stdlib (v4.12.0)
edit flag offensive delete link more
0

answered 2016-08-25 09:48:14 -0500

Hi,

Is there a solution to the above? I'm running int he same problem with the following setup: Win2012R2 Powershell V5 (5.0.10586.117) Masterless setup using puppet apply Puppet agent 4.6.0 Powershell and reboot module present in modules folder

I've tried all I can and I just can;t the dsc module to work at all. Any help would be great as I'd really like to use dsc with Puppet but it doesn't seem possible at the moment.

Thanks

Dan

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-02-02 06:54:12 -0500

Seen: 827 times

Last updated: Feb 02 '16