puppetlabs / puppetlabs-sshkeys_core

Apache License 2.0
4 stars 32 forks source link

Do not silently skip unknown OS #22

Closed faucct closed 5 years ago

faucct commented 5 years ago

I was trying to edit ~/.ssh/known_hosts and because of this constraint action was just skipping without any logs even in debug mode. I think you should put these version constraints closer to the code they are related to.

joshcooper commented 5 years ago

Hi @faucct. Thanks for your contribution. The module metadata doesn't affect any functionality on the server or agent. It's just used as guidance on the forge to indicate which platforms it should generally work on. What was the issue you ran into?

faucct commented 5 years ago

I was running this resource with bolt and it was quietly skipping until I have added this module to puppetfile and changed its metadata. I will check if just adding the module is sufficient.

faucct commented 5 years ago

Yes, for some reason just adding mod 'puppetlabs-sshkeys_core' to Puppetfile was sufficient. Could you tell me why? I am using bolt of version 1.29.0 on OS X distributed with brew.

joshcooper commented 5 years ago

Prior to Puppet 6, several types and providers like sshkeys were in the puppet repo. In Puppet 6, we removed them from puppet and converted them to proper modules, like https://github.com/puppetlabs/puppetlabs-sshkeys_core. So if you are using puppet 6 or above as a gem (or brew apparently), then you will need to explicit add them to your Puppetfile. However if you are using native puppet-agent packages, then the modules are already included.