voxpupuli / puppet-windowsfeature

Library that uses ServerAdministration api that comes with Windows Server 2008 and Windows Server 2012 to add / remove windows features
https://forge.puppet.com/puppet/windowsfeature
MIT License
30 stars 49 forks source link

dism to windowsfeature: Invalid resource type windowsfeature #1

Closed ringods closed 11 years ago

ringods commented 11 years ago

For readability, I want to migrate from the dism module to windowsfeature. However, in my Vagrant setup with librarian-puppet, I add this to init.pp:

windowsfeature { 'IIS-WebServer': }

When I run vagrant provision I always get an error:

C:\Code\hb-windows-iis-site>vagrant provision
[default] Running provisioner: puppet...
Running Puppet with init.pp...
←[1;31mError: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type windowsfeature at C:/tmp/vagrant-puppet/manifests/init.pp:18 on node vagrant-2008r2

Any idea what I'm missing here?

stack72 commented 11 years ago

Hey @ringods

What OS are you trying to run this on? The ServerManager cmdlet that this module uses is for Windows Server 2008 and above. Are you trying to use this on Windows 7 or Windows 8?

Paul

ringods commented 11 years ago

My Vagrant VM is a Windows 2008R2. I converted this snippet to install the .NET Framework via dism:

dism { 'NetFx3':
  ensure => present,
}

to

windowsfeature { 'AS-Net-Framework': }

Running the ServerManager cmdlets myself, it works correctly, so I must be missing something Puppet specific here.

stack72 commented 11 years ago

It looks like it isnt on the box itself. Can you check the modules folder to make sure that it is actually checked out?

ringods commented 11 years ago

The puppet provisioner configuration in my Vagrantfile is pretty standard:

  config.vm.provision :puppet do |puppet|
    puppet.module_path = "modules"
    puppet.manifests_path = "manifests"
    puppet.manifest_file  = "init.pp"
  end

The output while running vagrant up:

[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0

In my virtual machine, I checked if all the required modules are in my modules path (for wich dism works btw) and the windows_feature module is there with all it's contents.

ringods commented 11 years ago

@stack72 I have been trying a lot and eventually renamed the code from windowsfeature to windows_feature to match the module name. This seems to fix it for me. Changing the module name to match the code also works.

Can you choose one or the other to make things consistent?

cyberious commented 11 years ago

There are a multitude of issues with this ModuleFile and the mismatch of naming patterns I have submitted a patch and hope that it gets accepted. Renamed puppet-windows_feature to opentable-windowsfeature as spec states that it should be -

cyberious commented 11 years ago

Please close as this has been resolved. A merge has been performed and is no longer an issue. Until the forge updates you will have to install from source however.

noma4i commented 10 years ago

Still incorrect package at Forge. Spent hour to find out the problem..

cyberious commented 10 years ago

I believe you will see to windows feature ones. Windowsfeature and windowsfeature. Make sure you are pulling the latest one.

On Thursday, February 13, 2014, Alexander Tsirel notifications@github.com wrote:

Still incorrect package at Forge. Spent hour to find out the problem..

Reply to this email directly or view it on GitHubhttps://github.com/opentable/puppet-windowsfeature/issues/1#issuecomment-34969748 .