I guess I should have running a Foreman / Puppet setup, so I am trying to 
keep from having to go creating <node>.yaml files as well as editing things 
like site.pp and other files. 

The object I am trying to accomplish is on the KISS principal.

So for example my sudoers.erb has an array block for *sudoers_extra_lines* that 
adds a block for a specific user. It is kludgy. I have a case on hostname 
and it then sets the associated sudo_extra_lines to the 
sudo::sudo_lines::<user>.  I have also done an array on this to have *userX 
*and *userQ*. 

Since all of our Puppet code is in a source code repo and requires a change 
control to push to PROD, I don;t want to have to manually create a per host 
entry, either via the* case* statement or a *node.yaml* file as that 
requires a full regression test and verification before it moves to PROD. 

Via Foreman I can add puppet classes for *userX *and *userQ* to a specific 
server. As long as *sudo::sudoers::userX *and *sudo::sudoers::userQ *are 
defined in the Puppet code, then no change to modify code or custom hiera 
yaml files is required. This takes the sudo setups from having to be done 
per node in code to a point and click for the team that handles the tickets 
for the host definitions in Foreman. 

I'm not a Puppet coding expert, or even consider I can admit to doing more 
than basic hacking of other's code.

John's suggestions on a template is similar to what I have now, but 
requires a way to dynamically build the needed arrays. 

Rob's details on the way to do it via yaml are equally beneficial.

Unfortunately something isn't clicking for me somewhere to bridge the gap 
between the Puppet Docs and how to make this work. 

If anyone has a better reference for non-expert Puppet programmers to 
better dumb this down it would be greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2fdb8247-8e3e-4bdf-8efb-e720289226f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to