Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # /etc/puppet/modules/mcollective/manifests/params.pp
- class mcollective::params {
- $mcollective_username = 'mcollective'
- $mcollective_password = 'some_password'
- }
- # /etc/puppet/modules/mcollective/manifests/init.pp
- class mcollective::server {
- include mcollective::params
- package { mcollective: ensure => latest }
- package { mcollective-plugins: ensure => latest }
- file { "/etc/mcollective/server.cfg":
- owner => "root",
- group => "root",
- mode => "644",
- content => template("mcollective/server.cfg.erb"),
- require => [ Package["mcollective"],
- Package["mcollective-plugins"]
- ]
- }
- service { "mcollective":
- ensure => "running",
- enable => true,
- hasrestart => true,
- subscribe => File["/etc/mcollective/server.cfg"]
- }
- }
- class mcollective::client {
- include mcollective::params
- package { mcollective-client: ensure => latest }
- file { "/etc/mcollective/client.cfg":
- owner => "root",
- group => "root",
- mode => "644",
- source => template("mcollective/client.cfg.erb"),
- require => Package["mcollective-client"],
- }
- }
- # /etc/puppet/modules/mcollective/templates/server.cfg.erb
- topicprefix = /topic/
- main_collective = mcollective
- collectives = mcollective
- libdir = /usr/libexec/mcollective
- logfile = /var/log/mcollective.log
- loglevel = info
- daemonize = 1
- # Plugins
- securityprovider = psk
- plugin.psk = <%= mcollective_password %>
- connector = stomp
- plugin.stomp.host = puppet
- plugin.stomp.port = 6163
- plugin.stomp.user = <%= mcollective_username %>
- plugin.stomp.password = <%= mcollective_password %>
- # Facts
- factsource = yaml
- plugin.yaml = /etc/mcollective/facts.yaml
- # /etc/puppet/modules/mcollective/templates/client.cfg.erb
- topicprefix = /topic/
- main_collective = mcollective
- collectives = mcollective
- libdir = /usr/libexec/mcollective
- logfile = /dev/null
- loglevel = info
- # Plugins
- securityprovider = psk
- plugin.psk = <%= mcollective_password %>
- connector = stomp
- plugin.stomp.host = puppet
- plugin.stomp.port = 6163
- plugin.stomp.user = <%= mcollective_username %>
- plugin.stomp.password = <%= mcollective_password %>
- # Facts
- factsource = yaml
- plugin.yaml = /etc/mcollective/facts.yaml
Add Comment
Please, Sign In to add comment