Skip to content

Commit

Permalink
Merge pull request #38 from AtomesHosting/master
Browse files Browse the repository at this point in the history
Add Registation Plugin options
  • Loading branch information
raphink committed Oct 30, 2013
2 parents ca7eaf6 + 1f4672d commit 12517e8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
# Defaults to '/etc/mcollective/policies'.
# ['direct_addressing'] - Enable direct addressing.
# Defaults to '0'.
# ['registration'] - The registration plugin to use
# Defaults to 'AgentList.
# ['registerinterval'] - Registration interval
# Defaults to '300'.
# ['registration_collective'] - The registration collective to use
# Defaults to undef.
# ['ssl_source_dir'] - Where to get certificates from.
# Defaults to undef.
#
Expand Down Expand Up @@ -131,6 +137,9 @@
$cert_dir = $mcollective::params::cert_dir,
$policies_dir = $mcollective::params::policies_dir,
$direct_addressing = $mcollective::params::direct_addressing,
$registration = $mcollective::params::registration,
$registerinterval = $mcollective::params::registerinterval,
$registration_collective = undef,
$ssl_source_dir = undef,
) inherits ::mcollective::params {

Expand Down
9 changes: 9 additions & 0 deletions manifests/node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
# Defaults to '/etc/mcollective/policies'.
# ['direct_addressing'] - Enable direct addressing.
# Defaults to '0'.
# ['registration'] - The registration plugin to use
# Defaults to 'AgentList.
# ['registerinterval'] - Registration interval
# Defaults to '300'.
# ['registration_collective'] - The registration collective to use
# Defaults to undef.
# ['ssl_source_dir'] - Where to get certificates from.
# Defaults to undef.
#
Expand Down Expand Up @@ -113,6 +119,9 @@
$policies_dir = $mcollective::policies_dir,
$direct_addressing = $mcollective::direct_addressing,
$ssl_source_dir = $mcollective::ssl_source_dir,
$registration = $mcollective::registration,
$registration_collective = $mcollective::registration_collective,
$registerinterval = $mcollective::registerinterval,
) {

if !defined(Class['::mcollective']) {
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
$use_node = true
$use_client = false
$direct_addressing = 0
$registration = 'Agentlist'
$registerinterval = 300

case $::osfamily {
'Debian': {
Expand Down
8 changes: 6 additions & 2 deletions templates/server.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ plugin.yaml = /etc/mcollective/facts.yaml

classesfile = /var/lib/puppet/state/classes.txt

registerinterval = 300
registration = Agentlist
# Registration
registerinterval = <%= scope.lookupvar('mcollective::node::registerinterval') %>
registration = <%= scope.lookupvar('mcollective::node::registration') %>
<% if scope.lookupvar('mcollective::node::registration_collective') != :undef %>
registration_collective = <%= scope.lookupvar('mcollective::node::registration_collective') %>
<%- end %>

0 comments on commit 12517e8

Please sign in to comment.