Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Confirm Behavior of Puppet/Chef using DSC Resources with Get missing MOF parameters #510

Open
PlagueHO opened this issue Jun 7, 2019 · 3 comments

Comments

@PlagueHO
Copy link
Contributor

PlagueHO commented Jun 7, 2019

Puppet and Chef can use DSC Resources. However, they use them in a different way to the DSC LCM. It would be good to confirm if Puppet/Chef has any issues with resources when the input parameters in Get-TargetResource differ from the MOF.

This is to confirm that this style guideline will not cause any problems for Puppet/Chef users of the DSC resource kit.

@indented-automation
Copy link
Contributor

Puppet does not call Get-TargetResource at all. Both the dsc and dsc_lite modules use Invoke-DscResource to call Test and Set.

The dsc module parses the mof file on build to establish which parameters should be replayed into a puppet type definition.

I personally can't see a reason why the style guideline would cause a problem for Puppet.

@jpogran
Copy link
Contributor

jpogran commented Jun 10, 2019

Hi, Puppet employee here, primary contributor to the puppetlabs-dsc and puppetlabs-dsc_lite modules. As @indented-automation said, we use Invoke-DscResource to call the Test and Set methods directly, as those map to our workflow the best. You can see an example here and here. We do not use the Get methods as Puppet tracks state differently than DSC does.

What would make things difficult for us if the parameter sets for each of the functions are different. In the puppetlabs-dsc module we rely on parsing existing MOF files to build Puppet types. If there are significant differences in parameter sets, we could have problems determining which to include. This is less of a problem in the puppetlabs-dsc_lite module, as we leave it up to the user to specify which parameters to include.

@PlagueHO
Copy link
Contributor Author

Thanks @jpogran ! Appreciate the response and the detail + links. Now we just need to find out from the team at Chef. Hopefully it is the same situation. I'm not really considering Ansible here, but perhaps we should?

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

No branches or pull requests

3 participants