Could not autoload puppet/type/dism Error on running puppet script

asked 2015-06-16 18:51:06 -0600

ajay gravatar image

updated 2015-06-17 18:23:18 -0600

GregLarkin gravatar image

Puppet Agent - 64 bit v4.0.0 OS- Windows Server R2 64 bit

I am trying to install IIS by using DISM module (https://forge.puppetlabs.com/puppetla...) from Puppet site.

I am trying to run the following script. Im sure it is correct.

dism { 
    'IIS-WebServerRole': ensure => present,
}       

dism {
    'IIS-WebServer': ensure => present,
}

The module is correctly installed and I have tried re-installing it several times but I get the the error mentioned below repeatedly. How do I resolve this ?

Im using Puppet

C:\Program Files\Puppet Labs\Puppet\bin>puppet apply IIS_Install.pp
Error: Could not autoload puppet/type/dism: Attempt to redefine method set_present with block
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/dism: Attempt to redefine method set_pesent with block at C:/Program Files/Puppet Labs/Puppet/bin/IIS_Install.pp:2:3 on node win-i73ju1hai2q.localdomain
edit retag flag offensive close merge delete

Comments

Are you able to edit your post to fix the formatting - also what does puppet apply --configprint modulepath show?

Alex Harvey gravatar imageAlex Harvey ( 2015-06-17 06:02:12 -0600 )edit

I am getting the same error when I run my puppet-rspec tests. Although module seems to run successfully.

Hobbit71 gravatar imageHobbit71 ( 2015-08-19 04:09:12 -0600 )edit