Files
confdroid_puppet/manifests/main/files.pp

58 lines
1.6 KiB
ObjectPascal
Raw Normal View History

2025-02-26 01:55:17 +01:00
## puppet_cd::main::files.pp
# Module name: puppet_cd
# Author: Arne Teuke (arne_teuke@confdroid)
# @summary Class manages config files for the puppet_cd module.
###############################################################################
class puppet_cd::main::files (
2025-02-26 17:05:18 +01:00
) inherits puppet_cd::params {
2025-02-26 02:21:44 +01:00
require puppet_cd::main::dirs
2025-02-26 21:13:33 +01:00
if $fqdn != $pt_pm_fqdn {
file { $pt_puppet_conf_file:
ensure => file,
path => $pt_puppet_conf_file,
owner => 'root',
group => 'root',
mode => '0644',
2025-02-26 21:59:41 +01:00
content => template($pt_puppet_conf_erb),
2025-02-26 21:13:33 +01:00
notify => Service[$pt_agent_service],
}
}
if $fqdn == $pt_pm_fqdn {
file { $pt_puppet_conf_file:
ensure => file,
path => $pt_puppet_conf_file,
owner => 'root',
group => 'root',
mode => '0644',
content => template($pt_puppet_conf_erb),
notify => Service[$pt_agent_service,$pt_server_service],
}
}
if $pt_use_puppetdb == true {
file { $pt_puppetdb_conf_file:
ensure => file,
2025-02-26 21:13:33 +01:00
path => $pt_puppetdb_conf_file,
owner => 'root',
group => 'root',
mode => '0644',
content => template($pt_puppetdb_conf_erb),
# notify => Service[$pt_agent_service,$pt_server_service],
2025-02-26 21:13:33 +01:00
}
# fix service file syslog vs journald
file { $pt_puppetdb_service_file:
ensure => file,
path => $pt_puppetdb_service_file,
owner => 'root',
group => 'root',
mode => '0644',
content => template($pt_puppetdb_service_erb),
notify => Service[$pt_db_service],
}
2025-02-26 21:13:33 +01:00
}
2025-02-26 01:55:17 +01:00
}