Moritz Tanzer
2013-Mar-19 13:21 UTC
[Puppet Users] Generating a config file from multiple classes
Hello, is it possible to modify the same file with two different inherited classes? I have to define some kernel modules which must be loaded automatically at system startup. Probably the easiest way would be writing the module''s name in /etc/modules.conf. But how do I manage several host with different requirements? For example there''s a basic manifest for the clustered server which makes sure among other things that the drbd kernel module get''s loaded but on some of these server another kernel module also needs to be loaded. Thanks. Moritz -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
llowder
2013-Mar-19 14:02 UTC
[Puppet Users] Re: Generating a config file from multiple classes
On Tuesday, March 19, 2013 8:21:24 AM UTC-5, Moritz Tanzer wrote:> > Hello, > > is it possible to modify the same file with two different inherited > classes? > > I have to define some kernel modules which must be loaded automatically at > system startup. Probably the easiest way would be writing the module''s name > in /etc/modules.conf. But how do I manage several host with different > requirements? For example there''s a basic manifest for the clustered server > which makes sure among other things that the drbd kernel module get''s > loaded but on some of these server another kernel module also needs to be > loaded. > >You have a couple different options. Use file_line()[1], concat[2] or augeas[3]. Each has advantages and disadvantages, but each will let you do what yo are trying to do.> Thanks. > > Moritz >[1] https://github.com/puppetlabs/puppetlabs-stdlib [2] https://github.com/ripienaar/puppet-concat [3] http://docs.puppetlabs.com/references/stable/type.html#augeas -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.