Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windowsfeature gives Corrective change every time #111

Closed
WesselK opened this issue Dec 19, 2017 · 6 comments
Closed

Windowsfeature gives Corrective change every time #111

WesselK opened this issue Dec 19, 2017 · 6 comments
Assignees

Comments

@WesselK
Copy link

WesselK commented Dec 19, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: v2017.3.2
  • Ruby:
  • Distribution:
  • Module version: 3.1.0

Hi,

This may be a noob question as we are just starting to use Puppet to manage Windows machines. As we are building roles we are planning to use the module Windowsfeature.
However, the module changes the machine everytime instead of checking first if it is necessary. This causes a incorrect report on the server as nothing was changed but still a corrective change is showed in the report. Is this by default or should i wrap some code around it to check? (which defeats the purpose of using this module instead of powershell code).

Regards,
Wessel

How to reproduce (e.g Puppet code you use)

windowsfeature { 'Web-Http-Redirect':
ensure => present,
}

What are you seeing

In report: Windowsfeature['Web-Http-Redirect'] created Corrective change absent present

What behaviour did you expect instead

The feature was already installed last run, so i don't expect a corrective change.

Output log

Debug: Executing: 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Ins
tall-WindowsFeature 'Web-Http-Redirect''
Debug: Powershell create response was '
Success Restart Needed Exit Code Feature Result


True No NoChangeNeeded {}

'
Notice: /Stage[main]/Profile::Front_end_webserver/Windowsfeature['Web-Http-Redir
ect']/ensure: created
Debug: /Stage[main]/Profile::Front_end_webserver/Windowsfeature['Web-Http-Redire
ct']: The container Class[Profile::Front_end_webserver] will propagate my refres
h event
Debug: Class[Profile::Front_end_webserver]: The container Stage[main] will propa
gate my refresh event
Debug: Finishing transaction 58703780
Debug: Storing state
Debug: Stored state in 0.89 seconds
Notice: Applied catalog in 11.20 seconds

Any additional information you'd like to impart

@TraGicCode TraGicCode self-assigned this Jan 7, 2018
@TraGicCode
Copy link
Contributor

Hey @WesselK , before i dive into looking at this can you please provide the following information:

  1. Puppet Agent Version
  2. Windows Server O/S Version

@WesselK
Copy link
Author

WesselK commented Jan 8, 2018

Hi,

Thanks for responding. Here's the requested info:

  1. version 4.10.5
  2. Windows Server 2012 R2

@TraGicCode
Copy link
Contributor

Awesome Thanks

@TraGicCode
Copy link
Contributor

Hey @WesselK ,

Unfortunately i'm unable to reproduce your error. Could you try a a couple things for me?

  1. Your logs indicate a reboot is required to finish installation. Could you try to reboot to see if it resolves the issue?
  2. Can you post more debug logs to have more context?

@TraGicCode
Copy link
Contributor

@WesselK Closing this issue out since there has been no response. Can reopen when more information is provided.

@WesselK
Copy link
Author

WesselK commented Mar 8, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants