For the way you are doing thing, the easiest answer is: use templates.  Here
is an example from my sshd_config.erb file that may be of use to you:

----------------- CUT HERE ---------------------
pps = cprt_classes.split(',') rescue []
my_login_groups = ['root', 'wheel', 'sysadmin']
my_login_groups << 'xdeploy' if pps.index('scheduler') != nil
my_login_groups << 'java' if pps.index('scheduler') != nil
my_login_groups << 'netdb' if pps.index('bind::server') != nil
my_login_groups << 'hudson' if pps.index('hudson') != nil
my_login_groups << 'jira' if pps.index('jira') != nil
my_login_groups << 'security' if fqdn == 'qlvsbild002.example.com'
my_login_groups << 'dev' if fqdn == 'qrnsoems001.example.com'
-%>
AllowGroups <%= my_login_groups.join(' ') %>
----------------- CUT HERE ---------------------

Another way to do this would be with override classes.  Here is an (fully
contrived and untested) example.

class standard {
  file { "/etc/passwd":  source => "puppet:///modules/standard/passwd" }
}

class standard::germany inherits standard {
  File["/etc/passwd"]{source => "puppet:///modules/standard/passwd.germany"
}
}

node /^.*.de/ { include standard::germany }
node default { include standard }


On Fri, Feb 25, 2011 at 5:14 AM, Jed <jedbl...@gmail.com> wrote:

> At the least, can someone be so kind as to tell me the term to search
> about -- i've googled a bit, and I think "node override" is what im
> after?
>
> On Feb 24, 9:16 am, Jed <jedbl...@gmail.com> wrote:
> > Hi all,
> >
> > I think this has been asked in one form or another, but my problem so
> > far is i'm not sure of the terminology or nomenclature to use in my
> > search string to find out my answer...
> >
> > So, here is my question..
> >
> > I have lots of systems/instances, like most of us, and like most of
> > they are spread across different tiers and environments.
> >
> > ie. dev/stg/prod
> >
> > i've setup my puppet master to look for environment variables and
> > based off of that the client will look under /etc/puppet/development
> > or ./lab or ./prod ...etc..etc (that works great)
> >
> > Now i've reached the point where I have a global baseline config/
> > manifest that every host in each environment(dev/stg/prod) will get -
> > that works great as well.
> >
> > My problem now is that we have different host "groups", that require
> > different files set of files outside of what the global base_line
> > manifest provides.
> >
> > for intance..
> >
> > host that contain "wwwfe" in their host name need a different sudoers
> > file then hosts that contain "profile" in thier hostname
> >
> > is there a way that i can say...
> >
> > provide the base_line to every machines/instance, but only provide the
> > "www-sudoers" file to host that contain "wwwfe" in their hostname
> >
> > or...
> >
> > provide the profile_sudoers file only to hosts that contain the
> > "profile" in their host names?
> >
> > not sure if they is even the correct way to go about this....
> > currently I don't have any external node configuration(ie. ldap) so
> > i'm doing everything by hand in the nodes.pp file
> >
> > Thanks guy/gals, I really appreciate all the help!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to