Description
Describe the Bug
I am writing code to manage a licensed Chocolatey install for a customer that has their systems locked down and unable to access the general Internet. As a result, we want to disable the Chocolatey licensed source.
When I use the code:
chocolateysource {'chocolatey.licensed':
ensure => disabled,
}
I get a constant stream of 'corrective' changes where Puppet tries to change the user for this source to the empty string, and its priority to 0 (originally 'customer' and 10, respectively). Obviously, these changes aren't persisting, so Puppet tries to do them every time, without success.
Adding the parameters:
user => 'customer',
password => 'nopass',
priority => 10,
within the chocolateysource code block results in the proper idempotent behaviour. (Which has then led to the security team questioning the plain text password in the code - though after I explained the reason, they were fine with it.)
Expected Behavior
Disabling a source should not result in a constant stream of corrective changes. (Note that I have not tried disabling any other source; the issue may be specific to the chocolatey.licensed source.)
Steps to Reproduce
See above.
Environment
- Puppet Labs chocolatey provider 5.2.1 (the problematic code appears to still be present in 6.2.0)
- PE version 2019.8.7
- Windows Server 2019
- Chocolatey version 1.1.0
Additional Context
Add any other context about the problem here.