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

Ensure no longer defaults to present in v2.x - Nothing to manage: no ensure and the resource doesn't exist #63

Closed ferventcoder closed 8 years ago

ferventcoder commented 8 years ago

Affected Puppet, Ruby, OS and module versions/distributions

 windowsfeature { 'Web-WebServer':
    installmanagementtools => true,
  }

What are you seeing

Debug: Executing: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe Get-WindowsFeature | ConvertTo-JSON'
Debug: /Stage[main]/Windowsfeature[Web-WebServer]: Nothing to manage: no ensure and the resource doesn't exist

What behaviour did you expect instead

Hoping that it would install the feature.

However, explicitly adding ensure => present does work.

 windowsfeature { 'Web-WebServer':
    ensure => present,
    installmanagementtools => true,
  }
Notice: /Stage[main]/Windowsfeature[Web-WebServer]/ensure: created

Any additional information you'd like to impart

Typically ensure has a default value of present.

ferventcoder commented 8 years ago

Just an additional note that prior to v2, ensure wasn't required. Probably better to be explicit about it, but IDK. Thought I would report the issue.