Hello, I need some guidance/direction on what to lookup and where I can
find an example of how to provide values to a class so that they will be
used by the class (and the ERBtemplate within).

I want to be able to provide the variable *collector_id* to my class and
from the Red Hat Satellite Puppet Master provide collector_id =
mycollector.some.net so that it will be used to generate text and then
populate -    mycollector.some.net in the file after some other text.

I figured something like this is needed; but I am not sure and cannot find
an example to confirm I am on the correct track:

*class* rsyslog_mgmt (collector_id) {
    file { '/etc/rsyslog.conf':
           ensure  => 'present',
           content => template('rsyslog_mgmt/syslog.conf.erb'),
    }
}

Then the content of my file syslog.conf.erb would look something like this:

...snippet...
*.info;authpriv.*;mail.none;news.none              <%= @collector_id %>
...EOF...

Am I on the correct track?  Do I need a $ symbol in front of the
collector_id within the () at the top in front of the first curly brace
that starts the class definition?

Thanks in advance, I have learned a few things in the past week and
starting to gain some confidence due to my increased collaboration with the
real veterans of Puppet.


--------------------------
Warron French

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJdJdQ%3D0HwE%3DzaG9g1BYqch9ur7X7NdCKX1rV_pi6z2y6mU0cA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to