On Tue, Feb 7, 2012 at 06:17, thinkwell <[email protected]> wrote:
> First-time poster investigating Puppet for managing CentOS-based
> firewall distros at various locations. I have approximately 130
> machines to administrate so some type of config management is
> certainly needed.
>
> I've been working through Puppet tutorials and I'm wondering if Puppet
> will do what I need; all machines are very similar. However each
> machine will have small differences. For example,
>
> 1. SSH Ports: Machines have custom SSH ports so that's one variable
> that would prevent me from just copying sshd_config.
[...]
> 3. Iptables: All machines have standardized Iptables rules in /etc/
> rc.d/rc.firewall.local. But again each machine has rules on a per-host
> basis.
>
> Originally, what I thought I could do is have certain sections of the
> config files managed by Puppet, with other sections managed by local
> edits on a per-host basis. But I'm gathering that's not how Puppet
> works - you manage the whole config file and apply various config
> versions based on Facter facts, node types, etc. If that's my only
> option, I'll have to maintain custom conf files on Puppetmaster for
> every host!
If every host is unique, you already maintain custom files for every
host, right? The only difference in the Puppet model is that you can
*see* the them in one place, so you are aware of just how much work it
is making that work the way you want.
However, you can do other things. You can use facts to make decisions
based on the "nature" of the machine, as you would with the cache size
for Squid.
You can use a parameterized class or a template, and set the "SSH
port" on a per machine basis as data, then use the same configuration
template for every node. That moves from "a whole file" to "the
specific data we need to be unique", which is much easier to reason
about in the long term.
Finally, you can use things like `file {
"/etc/rc.d/rc.firewall.local": source =>
"puppet:///modules/firewall/rc.firewall.${fqdn}" }` to use a per-host
fact to select which configuration file you want. File even supports
multiple "sources", and selecting the first one, so you can have it
look for a "per host", then "per class", then "default" firewall
configuration.
Ultimately, though, you are *seeing* the problem you already had, just
laid out in a way that calls attention to it.
--
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.