Hi Guys, I am using foreman and puppet to provision/manage systems. I have a simple motd module that I was using for all my systems but now have a need to setup a different motd for a specific hostgroup/type of systems. So, I though I would use the hostgroup hiera setup from foreman/puppet to decide which motd to use. I wrote something quickly to test but have unexpected results and was hoping someone here can help me make sense of this:
-- my hostgroup for system 1 is CSOE73_Prod/hpc/misc and for system 2 is CSOE73_Prod/hpc/compute. So I decided to write the code this way: if [$hostgroup == 'CSOE73_Prod/hpc/misc'] { file { "/etc/motd": ensure => file, content => template('clientos/motd.erb') } } else { file { "/etc/motd": ensure => file, source => 'puppet:///modules/clientos/etc/motd', mode => 644, owner => 'root', group => 'root', } } -- However, for both systems the motd.erb template is being applied. However, my expectation was that for system 2 it would just use the files/etc/motd file. Is it maybe the backslash in CSOE73_Prod/hpc/misc that might be throwing it off? Am I going about this totally the wrong way? Any help would be greatly appreciated! Thanks, -J -- 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/ac2fd8e0-8e7d-455e-bbd3-cdcf1cdcb890%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.