puppet-prod/site/profiles/manifests/puppet/client.pp
Ben Vincent 1d20321e9f feat: migrate puppet-agent to openvox
- change from puppet-agent to openvox-agent
- upgrade version from 7.34 to 7.36
- ensure workflow of: Yumrepo -> dnf-makecache -> Package
2025-10-18 17:21:06 +11:00

49 lines
1.3 KiB
Puppet

# Class: profiles::puppet::client
#
# This class manages Puppet client configuration.
#
# site/profile/manifests/puppet/client.pp
class profiles::puppet::client (
Array $dns_alt_names = [$trusted['certname']],
String $server = 'puppetmaster',
String $ca_server = 'puppetca',
String $environment = 'develop',
Integer $runinterval = 1800,
Integer $runtimeout = 3600,
Boolean $show_diff = true,
Boolean $usecacheonfailure = false,
Integer $facts_soft_limit = 4096,
Boolean $openvox_enable = false,
) {
# dont manage puppet.conf if this is a puppetmaster
if $facts['enc_role'] != 'roles::infra::puppet::master' {
if $openvox_enable {
$use_service = 'puppet'
}else{
$use_service = 'puppet'
}
$dns_alt_names_string = join(sort($dns_alt_names), ',')
# Assuming you want to manage puppet.conf with this profile
file { '/etc/puppetlabs/puppet/puppet.conf':
ensure => 'present',
content => template('profiles/puppet/client/puppet.conf.erb'),
owner => 'root',
group => 'root',
mode => '0644',
notify => Service[$use_service],
}
package { 'toml_puppetagent_gem':
ensure => installed,
name => 'toml',
provider => 'puppet_gem',
notify => Service[$use_service],
}
}
}