diff options
-rw-r--r-- | manifests/daemon.pp | 22 | ||||
-rw-r--r-- | manifests/master.pp | 5 |
2 files changed, 13 insertions, 14 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 1102398..8c6e583 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -1,7 +1,6 @@ # handles puppetd service class puppet::daemon( $master = false, - $main_master = false, $ensure = hiera('puppet::daemon::ensure', ''), $port = hiera('puppet::daemon::port', "8140"), $runinterval = hiera('puppet::daemon::runinterval', "7200"), @@ -51,19 +50,14 @@ class puppet::daemon( $agent_name = 'agent' } - # Default config file for puppet nodes - if ($master != true) or ($main_master != true) { - file { "/etc/puppet/puppet.conf": - ensure => file, - owner => puppet, - group => puppet, - content => template("puppet/puppet-node.conf.erb"), - } - } else { - file { "/etc/puppet/puppet.conf": - ensure => file, - owner => puppet, - group => puppet, + # Puppet config file + file { "/etc/puppet/puppet.conf": + ensure => file, + owner => puppet, + group => puppet, + content => $master ? { + true => undef, # the content is in the git repo + default => template("puppet/puppet-node.conf.erb"), } } diff --git a/manifests/master.pp b/manifests/master.pp index 2d34b91..8ea4928 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -19,6 +19,11 @@ class puppet::master( include puppet::master::ca } + # then include the daemon + class { 'puppet::daemon': + master => true, + } + # needed packages package { "sqlite3": ensure => installed; |