OP#355 fork puppet_cd to confdroid_puppet
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
## puppet_cd::firewall::iptables.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::firewall::iptables.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages firewall settings for the puppet_cd module.
|
||||
# @summary Class manages firewall settings for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::firewall::iptables (
|
||||
class confdroid_puppet::firewall::iptables (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
firewall { '38140 open port 8140':
|
||||
proto => 'tcp',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## puppet_cd::init.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::init.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class initialize the puppet_cd module.
|
||||
# @summary Class initialize the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd {
|
||||
include puppet_cd::params
|
||||
class confdroid_puppet {
|
||||
include confdroid_puppet::params
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## puppet_cd::main::config.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::config.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages main logic for the puppet_cd module.
|
||||
# @summary Class manages main logic for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::config (
|
||||
class confdroid_puppet::main::config (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
include puppet_cd::server::service
|
||||
) inherits confdroid_puppet::params {
|
||||
include confdroid_puppet::server::service
|
||||
|
||||
if $pt_use_r10k == true {
|
||||
include puppet_cd::r10k::install
|
||||
include confdroid_puppet::r10k::install
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::main::dirs.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::dirs.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages directories for the puppet_cd module.
|
||||
# @summary Class manages directories for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::dirs (
|
||||
class confdroid_puppet::main::dirs (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::install
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
file { $pt_main_dir:
|
||||
ensure => directory,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::main::files.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::files.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages config files for the puppet_cd module.
|
||||
# @summary Class manages config files for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::files (
|
||||
class confdroid_puppet::main::files (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::dirs
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::dirs
|
||||
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
file { $pt_puppet_conf_file:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## puppet_cd::main::install.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::main::install.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages package installation for the puppet_cd module.
|
||||
# @summary Class manages package installation for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::main::install (
|
||||
class confdroid_puppet::main::install (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if $fqdn != $pt_pm_fqdn {
|
||||
package { $pt_agent_pkg:
|
||||
ensure => $pt_pkg_ensure,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## puppet_cd::params.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::params.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages parameters for the puppet_cd module.
|
||||
# @summary Class manages parameters for the confdroid_puppet module.
|
||||
# @param [Boolean] pt_manage_fw whether to manage firewall settings
|
||||
# @param [Boolean] pt_use_puppetdb whether to use puppetdb
|
||||
# @param [String] pt_pm_fqdn the fqdn for the puppetmaster and master
|
||||
@@ -65,7 +65,7 @@
|
||||
# @param [String] pt_pptdb_server_crt placeholder for the server.crt
|
||||
# @param [String] pt_pptdb_server_key placeholder for the server.crt
|
||||
###############################################################################
|
||||
class puppet_cd::params (
|
||||
class confdroid_puppet::params (
|
||||
|
||||
Boolean $pt_manage_fw = true,
|
||||
String $pt_pm_fqdn = 'puppetmaster.example.net',
|
||||
@@ -169,45 +169,45 @@ class puppet_cd::params (
|
||||
# files
|
||||
## puppet
|
||||
$pt_puppet_conf_file = "${pt_puppetdir}/puppet.conf"
|
||||
$pt_puppet_conf_erb = 'puppet_cd/puppet.conf.erb'
|
||||
$pt_puppet_conf_erb = 'confdroid_puppet/puppet.conf.erb'
|
||||
$pt_hiera_config = "${pt_puppetdir}/hiera.yaml"
|
||||
$pt_puppetdb_conf_file = "${pt_puppetdir}/puppetdb.conf"
|
||||
$pt_puppetdb_conf_erb = 'puppet_cd/puppetdb/puppetdb.conf.erb'
|
||||
$pt_puppetdb_conf_erb = 'confdroid_puppet/puppetdb/puppetdb.conf.erb'
|
||||
$pt_routes_file = "${pt_puppetdir}/routes.yaml"
|
||||
$pt_routes_erb = 'puppet_cd/puppetdb/routes.yaml.erb'
|
||||
$pt_routes_erb = 'confdroid_puppet/puppetdb/routes.yaml.erb'
|
||||
$pt_node_rb_file = "${pt_puppetdir}/node.rb"
|
||||
$pt_node_rb_erb = 'puppet_cd/puppetdb/node.rb.erb'
|
||||
$pt_node_rb_erb = 'confdroid_puppet/puppetdb/node.rb.erb'
|
||||
## r10k
|
||||
$pt_r10k_file = "${pt_r10k_dir}/r10k.yaml"
|
||||
$pt_r10k_erb = 'puppet_cd/r10k/r10k.yaml.erb'
|
||||
$pt_r10k_erb = 'confdroid_puppet/r10k/r10k.yaml.erb'
|
||||
$pt_webhook_link = 'ln -sf /usr/local/share/gems/gems/r10k_gitlab_webhook-0.1.3/bin/r10k_gitlab_webhook /usr/bin/'
|
||||
$pt_webhook_service_file = '/etc/systemd/system/r10k_gitlab_webhook.service'
|
||||
$pt_webhook_service_erb = 'puppet_cd/r10k/r10k_webhook_service.erb'
|
||||
$pt_webhook_service_erb = 'confdroid_puppet/r10k/r10k_webhook_service.erb'
|
||||
## puppetdb
|
||||
$pt_bootstrap_conf_file = "${pt_puppetdb_dir}/bootstrap.cfg"
|
||||
$pt_bootstrap_conf_erb = 'puppet_cd/puppetdb/bootstrap.cfg.erb'
|
||||
$pt_bootstrap_conf_erb = 'confdroid_puppet/puppetdb/bootstrap.cfg.erb'
|
||||
$pt_logback_conf_file = "${pt_puppetdb_dir}/logback.xml"
|
||||
$pt_logback_conf_erb = 'puppet_cd/puppetdb/logback.xml.erb'
|
||||
$pt_logback_conf_erb = 'confdroid_puppet/puppetdb/logback.xml.erb'
|
||||
$pt_logging_conf_file = "${pt_puppetdb_dir}/request-logging.xml"
|
||||
$pt_logging_conf_erb = 'puppet_cd/puppetdb/request_logging.xml.erb'
|
||||
$pt_logging_conf_erb = 'confdroid_puppet/puppetdb/request_logging.xml.erb'
|
||||
$pt_auth_conf_file = "${pt_puppetdb_conf_dir}/auth.conf"
|
||||
$pt_auth_conf_erb = 'puppet_cd/puppetdb/auth.conf.erb'
|
||||
$pt_auth_conf_erb = 'confdroid_puppet/puppetdb/auth.conf.erb'
|
||||
$pt_config_ini_file = "${pt_puppetdb_conf_dir}/config.ini"
|
||||
$pt_config_ini_erb = 'puppet_cd/puppetdb/config.ini.erb'
|
||||
$pt_config_ini_erb = 'confdroid_puppet/puppetdb/config.ini.erb'
|
||||
$pt_db_ini_file = "${pt_puppetdb_conf_dir}/database.ini"
|
||||
$pt_db_ini_erb = 'puppet_cd/puppetdb/database.ini.erb'
|
||||
$pt_db_ini_erb = 'confdroid_puppet/puppetdb/database.ini.erb'
|
||||
$pt_jetty_ini_file = "${pt_puppetdb_conf_dir}/jetty.ini"
|
||||
$pt_jetty_ini_erb = 'puppet_cd/puppetdb/jetty.ini.erb'
|
||||
$pt_jetty_ini_erb = 'confdroid_puppet/puppetdb/jetty.ini.erb'
|
||||
$pt_repl_ini_file = "${pt_puppetdb_conf_dir}/repl.ini"
|
||||
$pt_repl_ini_erb = 'puppet_cd/puppetdb/repl.ini.erb'
|
||||
$pt_repl_ini_erb = 'confdroid_puppet/puppetdb/repl.ini.erb'
|
||||
$pt_service_conf_file = '/usr/lib/systemd/system/puppetdb.service'
|
||||
$pt_service_conf_erb = 'puppet_cd/puppetdb/service.conf.erb'
|
||||
$pt_service_conf_erb = 'confdroid_puppet/puppetdb/service.conf.erb'
|
||||
$pt_ca_crt_file = "${pt_pptdb_ssldir}/ca.crt"
|
||||
$pt_ca_crt_erb = 'puppet_cd/puppetdb/ca.crt.erb'
|
||||
$pt_ca_crt_erb = 'confdroid_puppet/puppetdb/ca.crt.erb'
|
||||
$pt_server_crt_file = "${pt_pptdb_ssldir}/server.crt"
|
||||
$pt_server_crt_erb = 'puppet_cd/puppetdb/server.crt.erb'
|
||||
$pt_server_crt_erb = 'confdroid_puppet/puppetdb/server.crt.erb'
|
||||
$pt_server_key_file = "${pt_pptdb_ssldir}/server.key"
|
||||
$pt_server_key_erb = 'puppet_cd/puppetdb/server.key.erb'
|
||||
$pt_server_key_erb = 'confdroid_puppet/puppetdb/server.key.erb'
|
||||
|
||||
# service
|
||||
$pt_server_service = 'puppetserver'
|
||||
@@ -216,5 +216,5 @@ class puppet_cd::params (
|
||||
$pt_db_service = 'puppetdb'
|
||||
#
|
||||
# includes must be last
|
||||
include puppet_cd::main::config
|
||||
include confdroid_puppet::main::config
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## puppet_cd::puppetdb::dirs.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::puppetdb::dirs.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages directories for the puppetdb section
|
||||
###############################################################################
|
||||
class puppet_cd::puppetdb::dirs (
|
||||
class confdroid_puppet::puppetdb::dirs (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require puppet_cd::main::install
|
||||
require confdroid_puppet::main::install
|
||||
|
||||
file { $pt_puppetdb_dir:
|
||||
ensure => directory,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
## puppet_cd::puppetdb::files.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::puppetdb::files.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages config files for the puppetdb section
|
||||
###############################################################################
|
||||
class puppet_cd::puppetdb::files (
|
||||
class confdroid_puppet::puppetdb::files (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require puppet_cd::puppetdb::dirs
|
||||
require confdroid_puppet::puppetdb::dirs
|
||||
|
||||
# bootstrap.cfg
|
||||
file { $pt_bootstrap_conf_file:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## puppet_cd::r10k::install.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::r10k::install.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages r10k installation for the puppet_cd module.
|
||||
# @summary Class manages r10k installation for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::r10k::install (
|
||||
class confdroid_puppet::r10k::install (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
) inherits confdroid_puppet::params {
|
||||
if ($pt_pm_fqdn == $fqdn) and ($pt_use_r10k == true) {
|
||||
# enable CRB
|
||||
exec { 'enable_crb':
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## puppet_cd::server::service.pp
|
||||
# Module name: puppet_cd
|
||||
## confdroid_puppet::server::service.pp
|
||||
# Module name: confdroid_puppet
|
||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||
# @summary Class manages the puppet server service for the puppet_cd module.
|
||||
# @summary Class manages the puppet server service for the confdroid_puppet module.
|
||||
###############################################################################
|
||||
class puppet_cd::server::service (
|
||||
class confdroid_puppet::server::service (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
require puppet_cd::main::files
|
||||
) inherits confdroid_puppet::params {
|
||||
require confdroid_puppet::main::files
|
||||
|
||||
# manage agent service on all nodes
|
||||
service { $pt_agent_service:
|
||||
@@ -18,7 +18,7 @@ class puppet_cd::server::service (
|
||||
|
||||
# manage puppet server service
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
require puppet_cd::firewall::iptables
|
||||
require confdroid_puppet::firewall::iptables
|
||||
|
||||
service { $pt_server_service:
|
||||
ensure => running,
|
||||
@@ -28,7 +28,7 @@ class puppet_cd::server::service (
|
||||
}
|
||||
# manage webhook service
|
||||
if $pt_use_r10k_webhook == true {
|
||||
require puppet_cd::r10k::install
|
||||
require confdroid_puppet::r10k::install
|
||||
|
||||
service { $pt_r10k_webhook_service:
|
||||
ensure => running,
|
||||
@@ -40,8 +40,8 @@ class puppet_cd::server::service (
|
||||
}
|
||||
|
||||
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||
require puppet_cd::firewall::iptables
|
||||
require puppet_cd::puppetdb::files
|
||||
require confdroid_puppet::firewall::iptables
|
||||
require confdroid_puppet::puppetdb::files
|
||||
|
||||
service { $pt_db_service:
|
||||
ensure => running,
|
||||
|
||||
Reference in New Issue
Block a user