From 7ded8200e814b4488b4f9b5bbccfad82432af9fe Mon Sep 17 00:00:00 2001 From: Jenkins ConfDroid Date: Wed, 26 Feb 2025 21:14:30 +0100 Subject: [PATCH] recommit for updates in build 56 --- .../puppet_cd_3A_3Amain_3A_3Afiles.html | 74 +++- doc/puppet_classes/puppet_cd_3A_3Aparams.html | 408 +++++++++++++++++- 2 files changed, 475 insertions(+), 7 deletions(-) diff --git a/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Afiles.html index f6aad86..07032fa 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Afiles.html @@ -105,7 +105,43 @@ 7 8 9 -10 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46
# File 'manifests/main/files.pp', line 6
@@ -114,6 +150,42 @@ class puppet_cd::main::files (
 
 ) inherits puppet_cd::params {
   require puppet_cd::main::dirs
+
+  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],
+    }
+  }
+
+  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  => filet,
+      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],
+    }
+  }
 }
diff --git a/doc/puppet_classes/puppet_cd_3A_3Aparams.html b/doc/puppet_classes/puppet_cd_3A_3Aparams.html index fa822e1..d8a6ada 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Aparams.html +++ b/doc/puppet_classes/puppet_cd_3A_3Aparams.html @@ -881,6 +881,292 @@ considered a puppet agent.

+
  • + + pt_logging_max_file_size + + + (String) + + + (defaults to: '200MB') + + +
  • + +
  • + + pt_logging_max_history + + + (String) + + + (defaults to: '90') + + +
  • + +
  • + + pt_logging_total_size + + + (String) + + + (defaults to: '1GB') + + +
  • + +
  • + + pt_com_proc_threads + + + (String) + + + (defaults to: '4') + + +
  • + +
  • + + pt_concurrent_writes + + + (String) + + + (defaults to: '4') + + +
  • + +
  • + + pt_db_subname + + + (String) + + + (defaults to: '//localhost:5432/puppetdb') + + +
  • + +
  • + + pt_db_username + + + (String) + + + (defaults to: 'foobar') + + +
  • + +
  • + + pt_db_password + + + (String) + + + (defaults to: 'foobar') + + +
  • + +
  • + + pt_gc_interval + + + (String) + + + (defaults to: '60') + + +
  • + +
  • + + pt_log_slow_statements + + + (String) + + + (defaults to: '10') + + +
  • + +
  • + + pt_puppetdb_source_lan + + + (String) + + + (defaults to: '0.0.0.0/0') + + +
  • + +
  • + + pt_soft_write_failure + + + (Boolean) + + + (defaults to: false) + + +
  • + +
  • + + pt_no_ssl_host + + + (String) + + + (defaults to: '0.0.0.0') + + +
  • + +
  • + + pt_ssl_host + + + (String) + + + (defaults to: '0.0.0.0') + + +
  • + +
  • + + pt_ssl_key + + + (String) + + + (defaults to: '/etc/puppetlabs/puppetdb/ssl/private.pem') + + +
  • + +
  • + + pt_ssh_cert + + + (String) + + + (defaults to: '/etc/puppetlabs/puppetdb/ssl/public.pem') + + +
  • + +
  • + + pt_ssl_ca_cert + + + (String) + + + (defaults to: '/etc/puppetlabs/puppetdb/ssl/ca.pem') + + +
  • + +
  • + + pt_log_access + + + (Boolean) + + + (defaults to: false) + + +
  • + +
  • + + pt_access_log_config + + + (String) + + + (defaults to: '/etc/puppetlabs/puppetdb/request-logging.xml') + + +
  • + +
  • + + pt_enable_repl + + + (Boolean) + + + (defaults to: false) + + +
  • + +
  • + + pt_repl_port + + + (String) + + + (defaults to: '8082') + + +
  • + +
  • + + pt_repl_host + + + (String) + + + (defaults to: '127.0.0.1') + + +
  • + @@ -974,7 +1260,62 @@ considered a puppet agent.

    111 112 113 -114 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169
    # File 'manifests/params.pp', line 32
    @@ -991,11 +1332,7 @@ class puppet_cd::params (
       String $pt_agent_pkg              = 'puppet-agent',
       String $pt_server_pkg             = 'puppetserver',
       Array $pt_db_pkg                  = ['puppetdb','puppetdb-termini'],
    -  # puppetdb
    -  Boolean $pt_use_puppetdb          = false,
    -  String $pt_no_ssl_port            = '8080',
    -  String $pt_ssl_port               = '8081',
    -  Boolean $pt_use_ssl_only          = true,
    +
       # user settings
       ## puppet user
       Boolean $pt_manage_user           = true,
    @@ -1010,6 +1347,7 @@ class puppet_cd::params (
       String $pt_db_user_home           = '/opt/puppetlabs/server/data/puppetdb',
       String $pt_db_user_shell          = '/sbin/nologin',
       # templates
    +  ## puppet
       String $pt_environment            = 'production',
       Boolean $pt_allow_duplicate_certs = false,
       String $pt_basemodulepath         = '/etc/puppetlabs/code/environments/common:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules:/usr/share/puppet/modules',
    @@ -1037,11 +1375,39 @@ class puppet_cd::params (
       Boolean $pt_storeconfigs          = true,
       String $pt_storeconfigs_backend   = 'puppetdb',
       String $pt_parser                 = 'current',
    +## puppetdb
    +  Boolean $pt_use_puppetdb          = false,
    +  String $pt_logging_max_file_size  = '200MB',
    +  String $pt_logging_max_history     = '90',
    +  String $pt_logging_total_size     = '1GB',
    +  String $pt_com_proc_threads       = '4',
    +  String $pt_concurrent_writes      = '4',
    +  String $pt_db_subname             = '//localhost:5432/puppetdb',
    +  String $pt_db_username            = 'foobar',
    +  String $pt_db_password            = 'foobar',
    +  String $pt_gc_interval            = '60',
    +  String $pt_log_slow_statements    = '10',
    +  String $pt_no_ssl_port            = '8080',
    +  String $pt_ssl_port               = '8081',
    +  Boolean $pt_use_ssl_only          = true,
    +  String $pt_puppetdb_source_lan    = '0.0.0.0/0',
    +  Boolean $pt_soft_write_failure    = false,
    +  String $pt_no_ssl_host            = '0.0.0.0',
    +  String $pt_ssl_host               = '0.0.0.0',
    +  String $pt_ssl_key                = '/etc/puppetlabs/puppetdb/ssl/private.pem',
    +  String $pt_ssh_cert               = '/etc/puppetlabs/puppetdb/ssl/public.pem',
    +  String $pt_ssl_ca_cert            = '/etc/puppetlabs/puppetdb/ssl/ca.pem',
    +  Boolean $pt_log_access            = false,
    +  String $pt_access_log_config      = '/etc/puppetlabs/puppetdb/request-logging.xml',
    +  Boolean $pt_enable_repl           = false,
    +  String $pt_repl_port              = '8082',
    +  String $pt_repl_host              = '127.0.0.1',
     
     ) {
       $fqdn                       = $facts['networking']['fqdn']
     
     # directories
    +## puppet
       $pt_main_dir                = '/etc/puppetlabs'
       $pt_puppetdir               = "${pt_main_dir}/puppet"
       $pt_code_dir                = "${pt_main_dir}/code"
    @@ -1052,6 +1418,36 @@ class puppet_cd::params (
       $pt_rundir_master           = '/var/run/puppetlabs/puppetserver'
       $pt_vardir                  = '/opt/puppetlabs/puppet/cache'
       $pt_vardir_master           = '/opt/puppetlabs/server/data/puppetserver'
    +## puppetdb
    +  $pt_puppetdb_main           = '/etc/puppetlabs/puppetdb'
    +  $pt_puppetdb_conf_d         = "${pt_puppetdb_main}/conf.d"
    +  $pt_puppetdb_ssl            = "${pt_puppetdb_main}/ssl"
    +  $pt_puppetdb_log            = '/var/log/puppetlabs/puppetdb'
    +  $pt_puppetdb_var_dir        = '/opt/puppetlabs/server/data/puppetdb'
    +
    +# files
    +## puppet
    +  $pt_puppet_conf_file        = "${pt_puppetdir}/puppet.conf"
    +  $pt_puppet_conf_erb         = 'puppet_cd/puppet.conf.erb'
    +  $pt_hiera_config            = "${pt_puppetdir}/hiera.yaml"
    +## puppetdb
    +  $pt_bootstrap_conf        = "${pt_puppetdb_main}/bootstrap.cfg"
    +  $pt_bootstrap_erb         = 'cd_puppet/puppetdb/bootstrap.cfg.erb'
    +  $pt_puppetdb_access_log   = "${pt_puppetdb_log}/puppetdb-access"
    +  $pt_request_logging_conf  = "${pt_puppetdb_main}/request-logging.xml"
    +  $pt_request_logging_erb   = 'cd_puppet/puppetdb/request_logging.xml.erb'
    +  $pt_logback_conf          = "${pt_puppetdb_main}/logback.xml"
    +  $pt_logback_erb           = 'cd_puppet/puppetdb/logback.xml.erb'
    +  $pt_puppetdb_config_ini   = "${pt_puppetdb_conf_d}/config.ini"
    +  $pt_puppetdb_config_erb   = 'cd_puppet/puppetdb/config.ini.erb'
    +  $pt_puppetdb_database_ini = "${pt_puppetdb_conf_d}/database.ini"
    +  $pt_puppetdb_database_erb = 'cd_puppet/puppetdb/database.ini.erb'
    +  $pt_puppetdb_jetty_ini    = "${pt_puppetdb_conf_d}/jetty.ini"
    +  $pt_puppetdb_jetty_erb    = 'cd_puppet/puppetdb/jetty.ini.erb'
    +  $pt_puppetdb_conf_file    = "${pt_puppetdir}/puppetdb.conf"
    +  $pt_puppetdb_conf_erb     = 'cd_puppet/puppetdb/puppetdb.conf.erb'
    +  $pt_puppetdb_repl_ini     = "${pt_puppetdb_conf_d}/repl.ini"
    +  $pt_puppetdb_repl_erb     = 'cd_puppet/puppetdb/repl.ini.erb'
     
     # service
       $pt_server_service          = 'puppetserver'