So for the most part I have been able to translate the puppet forge
documentation on various modules to something I can use in my foreman
setup, and in general I have been able to write my own modules when
necessary.
Now of course with Foreman I can assign a particular class to a node in
that interface, as opposed to creating a node entry as you would with a
more basic puppet install.
For example I used the puppet forge apache module pretty easily by
assigning the apache module to a node. I then put the following in my own
class and assigned that class to the node as well.
apache::vhost { 'monitor.t2.ucsd.edu':
port => '443',
docroot => '/var/www/html',
ssl => true,
ssl_cert => '/etc/grid-security/httpcert.pem',
ssl_key => '/etc/grid-security/httpkey.pem',
ssl_crl_path => '/etc/grid-security/certificates',
}
and Voila, I got an apache ssl virtual host with the certs I wanted and a
CRL path.
However sometimes the documentation has me scratching my head a bit. For
example I want to give the zabbix module a try, but then I get to examples
like the following I am a bit stuck.
node 'zabbix.example.com'
class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php
class { 'postgresql::server': }
#class { 'mysql::server': }
class { 'zabbix':
zabbix_url => 'zabbix.example.com',
#database_type => 'mysql',
}
}
The problem is if you include a class on a host in foreman you get errors
about duplicate class definitions etc…
I do not suppose someone could help me translate the above to something I
can put into a foreman type puppet config? Basically how would I go about
best using this module with foreman? Or point me at some documentation or
examples of how to translate it?
Maybe if I start with something that is simpler?
class { 'zabbix::agent':
server => '192.168.20.11',
}
Sorry if this is a pretty basic question.
Thanks,
Terrence