Brett Cave
2011-Apr-06 17:01 UTC
[Puppet Users] Serverside concatenation and conditional checks
Hi, I''m trying to configure sysconfig file for a module. within modules, i have mod/files/ directory which contains sysconfig-base and sysconfig-nodename files. From the module''s init.pp, I then want to create a final file that consists of the concatenation of sysconfig-base and sysconfig-nodename (if sysconfig-nodename exists). This is what I have: file { ''/etc/sysconfig/application'': source => "puppet:///modules/mod/sysconfig-base" other_flags => "all other required file flags configured" } I am not sure how to concatenate the sysconfig-$hostname file on the server side. I have installed r.i. pienaars concat module, but that seems to work client-side, and not sure how to configure a conditional statement for server-side module file after this. 1 way of implementing that will work is by creating 2 files on the client: sysconfig.base and sysconfig.$hostname, and THEN using the client-side concat module, but I don''t think this is a good way of implementing this. alternatively: create a "concat.rb" ruby file (a new area of knowledge for me) to define a server-side concat of the files from the module dir, and then define the file above using "content" instead of "source"... Any of these methods on the right "puppetized" way of doing things? -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.