puppet-r10k icon indicating copy to clipboard operation
puppet-r10k copied to clipboard

Support running `puppet generate types` with r10k mcollective plugin?

Open alexjfisher opened this issue 7 years ago • 7 comments

I currently use this module's mcollective plugin to run R10K on multiple puppet servers. Is this plugin the right place to add support for running puppet generate types at the same time? https://docs.puppet.com/puppet/4.7/reference/environment_isolation.html#suggested-workflow

alexjfisher avatar Nov 07 '16 17:11 alexjfisher

+1 though I think it should be optional and default to false since it is both new and still experimental.

ghoneycutt avatar Nov 07 '16 17:11 ghoneycutt

Yes. Currently you could run it as the optional 'after' command. We can look at better ways to integrate it based on version, though. I just peeked at the documents, would this be for all 4.x or just starting with a specific version?

rnelson0 avatar Nov 07 '16 23:11 rnelson0

@rnelson0 The 'after' command? Or perhaps you were referring to this option? https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#postrun

The generate types feature is only available since puppet 4.6

alexjfisher avatar Nov 08 '16 11:11 alexjfisher

Yes, postrun (r10k::postrun in hiera) is the parameter whose name escaped me.

I assume we would look for puppet_version and use versioncmp on it, if it's above 4.6.0 generate types could be called. Sound correct?

rnelson0 avatar Nov 08 '16 14:11 rnelson0

The issue I see with postrun is that it's not per environment. It's only run if you're refreshing all environments. Maybe it's actually a patch to R10k that's needed before the R10K mcollective agent can be modified to support the additional functionality.

alexjfisher avatar Nov 08 '16 16:11 alexjfisher

@alexjfisher IIRC from IRC, you were investigating the patch to r10k option. Any update?

rnelson0 avatar Jan 08 '17 00:01 rnelson0

+1, every time some custom type changes parameters, one has to restart puppetserver to fix an environment

vchepkov avatar Aug 07 '17 19:08 vchepkov