You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using dsc_securityoption we ran into a parameter where the resource expects an array value, but once set DSC is returning a hash value. I'm not sure if this is an issue in how pwshlib is interpreting the return, or if it's something DSC itself that isn't right.
On the first run we see this:
Notice: /Stage[main]/Main/Dsc_securityoption[Restric clients allowed to make remote calls to SAM]/dsc_network_access_res
trict_clients_allowed_to_make_remote_calls_to_sam: dsc_network_access_restrict_clients_allowed_to_make_remote_calls_to_s
am changed [] to [
{
'identity' => 'Administrators',
'permission' => 'Allow'
}]
Puppet makes a change because the current value doesn't match the desired. However on subsequent runs we see this:
Notice: /Stage[main]/Main/Dsc_securityoption[Restric clients allowed to make remote calls to SAM]/dsc_network_access_res
trict_clients_allowed_to_make_remote_calls_to_sam: dsc_network_access_restrict_clients_allowed_to_make_remote_calls_to_s
am changed {
'permission' => undef,
'identity' => undef
} to [
{
'identity' => 'Administrators',
'permission' => 'Allow'
}]
If we try to change the value to hash we get an error because the type doesn't like it:
PS C:\Users\Administrator\test\securitypolicydsc> puppet apply .\examples\test.pp --modulepath .\spec\fixtures\modules\
Notice: Compiled catalog for famed-wardrobe.delivery.puppetlabs.net in environment production in 0.42 seconds
Error: Parameter dsc_network_access_restrict_clients_allowed_to_make_remote_calls_to_sam failed on Dsc_securityoption[Restric clients allowed to make remote calls to SAM]: dsc_securityoption.dsc_network_access_restrict_clients_allowed_to_make_remote_calls_to_sam expects a value of type Undef or Array, got Struct
PS C:\Users\Administrator\test\securitypolicydsc>
Looking at the run with pry, here's what's being reported back:
Describe the Bug
using dsc_securityoption we ran into a parameter where the resource expects an array value, but once set DSC is returning a hash value. I'm not sure if this is an issue in how pwshlib is interpreting the return, or if it's something DSC itself that isn't right.
On the first run we see this:
Puppet makes a change because the current value doesn't match the desired. However on subsequent runs we see this:
If we try to change the value to hash we get an error because the type doesn't like it:
Looking at the run with pry, here's what's being reported back:
Expected Behavior
Expect the resource to behave idempotently.
Steps to Reproduce
Example Puppet Code:
Environment
pwshlib 0.8.0
securitypolicydsc = Custom build with preview3 and Michael Lombardi's pull request included.
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: