diff --git a/manifests/main/config.pp b/manifests/main/config.pp index f4c61c4..9f78516 100644 --- a/manifests/main/config.pp +++ b/manifests/main/config.pp @@ -7,22 +7,8 @@ class puppet_cd::main::config ( ) inherits puppet_cd::params { - if $fqdn == $pt_puppetmaster { - notify { "This is the Puppet master node": } + include puppet_cd::server::service } - #if $fqdn == $pt_puppetmaster { - # notify {"Me Puppetmasster":} - #} - - #if $fqdn != $pt_puppetmaster { - # notify {"BAA":} - #} - -# Notify the node's FQDN -#notify { "This node's FQDN is ${facts['fqdn']}": } - -notify { " FQDN is ${fqdn}": } - } diff --git a/manifests/params.pp b/manifests/params.pp index 1b608aa..04ecc78 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,8 +10,10 @@ class puppet_cd::params ( ) { -#$fqdn = $facts['fqdn'] -$fqdn = $facts['networking']['fqdn'] +$fqdn = $facts['networking']['fqdn'] + +# service +$pt_service = 'puppetserver' # # includes must be last diff --git a/manifests/server/service.pp b/manifests/server/service.pp new file mode 100644 index 0000000..d5d7d3e --- /dev/null +++ b/manifests/server/service.pp @@ -0,0 +1,21 @@ +## puppet_cd::server::service.pp +# Module name: puppet_cd +# Author: Arne Teuke (arne_teuke@confdroid) +# @summary Class manages the puppet server service for the puppet_cd module. +############################################################################### +class puppet_cd::server::service ( + +) inherits puppet_cd::params { + + if $fqdn == $pt_puppetmaster { + + # manage puppet server service + + service { $pt_service: + ensure => running, + hasstatus => true, + hasrestart => true, + enable => true, + } + } +}