3
0

add service

This commit is contained in:
Arne Teuke
2025-02-26 01:22:41 +01:00
parent 46019ecd0b
commit bb2cf67e57
3 changed files with 26 additions and 17 deletions

View File

@@ -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}": }
}

View File

@@ -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

View 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,
}
}
}