3
0
Arne Teuke
2025-11-01 17:34:23 +01:00
parent 41ac17b901
commit 9fb5422b4b
13 changed files with 483 additions and 6 deletions

131
manifests/puppetdb/files.pp Normal file
View File

@@ -0,0 +1,131 @@
## puppet_cd::puppetdb::files.pp
# Module name: puppet_cd
# Author: Arne Teuke (arne_teuke@confdroid)
# @summary Class manages config files for the puppetdb section
###############################################################################
class puppet_cd::puppetdb::files (
) inherits puppet_cd::params {
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
require puppet_cd::puppetdb::dirs
# bootstrap.cfg
file { $pt_bootstrap_conf_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_bootstrap_conf_erb),
notify => Service[$pt_db_service],
}
# logback.xml
file { $pt_logback_conf_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_logback_conf_erb),
notify => Service[$pt_db_service],
}
# request-logging.xml
file { $pt_logging_conf_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_logging_conf_erb),
notify => Service[$pt_db_service],
}
# service config
file { $pt_service_conf_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => systemd_unit_file_t,
seluser => system_u,
content => template($pt_service_conf_erb),
notify => Service[$pt_db_service],
}
# conf.d files
## auth.conf
file { $pt_auth_conf_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_auth_conf_erb),
notify => Service[$pt_db_service],
}
# config.ini
file { $pt_config_ini_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_config_ini_erb),
notify => Service[$pt_db_service],
}
# database.ini
file { $pt_db_ini_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_db_ini_erb),
notify => Service[$pt_db_service],
}
# jetty.ini
file { $pt_jetty_ini_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_jetty_ini_erb),
notify => Service[$pt_db_service],
}
# repl.ini
file { $pt_repl_ini_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
content => template($pt_repl_ini_erb),
notify => Service[$pt_db_service],
}
}
}