add service
This commit is contained in:
@@ -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}": }
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
21
manifests/server/service.pp
Normal file
21
manifests/server/service.pp
Normal file
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user