Theforeman-puppet: Using puppetlabs-inifile provider to manage puppet.conf

I was wondering if there'd be any interest in a future PR to update
theforeman-puppet module to use the inifile provider (or a child provider
named puppet_config) for managing values in puppet.conf. The idea being
such a drastic change would be allow the puppet.conf to be modified by
other community modules or by individual's "site specific" modules while
still being able to use theforeman-puppet. The current number of possible
configuration values and options for puppet.conf is staggering and I'd
consider too great to effectively manage using a template approach without
limiting what users of theforeman-puppet module can do. I'm finding that
as my puppet setup becomes more complex (multiple masters with some clients
using masterless) I'm having to perform a PR on each new configuration
option needed to make my setup possible.

A PR to switch to using a type/provider for managing puppet.conf would
likely include a declaration in the init.pp that sets "resources {
'puppet_config': purge => $purge_puppet_config }" and the default value for
$purge_puppet_config would be true (or false if purging seems too 'harsh').

Thoughts?

Thanks,

  • Trey

Broadly I'm in favour. I'd like to see what the various comparative
benefits are of inifile vs augeas vs $otherthing-ive-not-thought-of
though.

Greg

Seems reasonable to me, and I agree about purging other entries by default.

The inifile type/provider is superior to the Augeas type, so I'd
recommend that. The only other alternative is datacat plus a template,
but I've not used it yet to offer a comparison.

··· On 09/07/14 18:21, Trey Dockendorf wrote: > I was wondering if there'd be any interest in a future PR to update > theforeman-puppet module to use the inifile provider (or a child > provider named puppet_config) for managing values in puppet.conf. The > idea being such a drastic change would be allow the puppet.conf to be > modified by other community modules or by individual's "site specific" > modules while still being able to use theforeman-puppet. The current > number of possible configuration values and options for puppet.conf is > staggering and I'd consider too great to effectively manage using a > template approach without limiting what users of theforeman-puppet > module can do. I'm finding that as my puppet setup becomes more complex > (multiple masters with some clients using masterless) I'm having to > perform a PR on each new configuration option needed to make my setup > possible. > > A PR to switch to using a type/provider for managing puppet.conf would > likely include a declaration in the init.pp that sets "resources { > 'puppet_config': purge => $purge_puppet_config }" and the default value > for $purge_puppet_config would be true (or false if purging seems too > 'harsh'). > > Thoughts?


Dominic Cleal
Red Hat Engineering

As Dominic mentioned, the inifile type/provider is superior to Augeas
and I find it MUCH easier to look at the code given I'm not an Augeas
expert :).

The datacat method could work too, but my initial impression is it is
somewhat more complex to implement. This is going off of looking at
the puppetlabs-mcollective module.

I'll see if I can get this implemented and tested.

  • Trey
··· On Thu, Jul 10, 2014 at 2:06 AM, Dominic Cleal wrote: > On 09/07/14 18:21, Trey Dockendorf wrote: >> I was wondering if there'd be any interest in a future PR to update >> theforeman-puppet module to use the inifile provider (or a child >> provider named puppet_config) for managing values in puppet.conf. The >> idea being such a drastic change would be allow the puppet.conf to be >> modified by other community modules or by individual's "site specific" >> modules while still being able to use theforeman-puppet. The current >> number of possible configuration values and options for puppet.conf is >> staggering and I'd consider too great to effectively manage using a >> template approach without limiting what users of theforeman-puppet >> module can do. I'm finding that as my puppet setup becomes more complex >> (multiple masters with some clients using masterless) I'm having to >> perform a PR on each new configuration option needed to make my setup >> possible. >> >> A PR to switch to using a type/provider for managing puppet.conf would >> likely include a declaration in the init.pp that sets "resources { >> 'puppet_config': purge => $purge_puppet_config }" and the default value >> for $purge_puppet_config would be true (or false if purging seems too >> 'harsh'). >> >> Thoughts? > > Seems reasonable to me, and I agree about purging other entries by default. > > The inifile type/provider is superior to the Augeas type, so I'd > recommend that. The only other alternative is datacat plus a template, > but I've not used it yet to offer a comparison. > > -- > Dominic Cleal > Red Hat Engineering > > -- > You received this message because you are subscribed to a topic in the Google Groups "foreman-dev" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/foreman-dev/M3r3oq2ofQE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.