diff --git a/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Adirs.html
index 11cb183..2669f2e 100644
--- a/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Adirs.html
+++ b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Adirs.html
@@ -132,7 +132,7 @@ class puppet_cd::main::dirs (
path => $pt_main_dir,
owner => 'root',
group => 'root',
- mode => '0750',
+ mode => '0755',
selrange => s0,
selrole => object_r,
seltype => puppet_etc_t,
diff --git a/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Auser.html
new file mode 100644
index 0000000..9a9f006
--- /dev/null
+++ b/doc/puppet_classes/puppet_cd_3A_3Amain_3A_3Auser.html
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+ Puppet Class: puppet_cd::main::user
+
+ — Documentation by YARD 0.9.26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: puppet_cd::main::user
+
+
+
+ - Inherits:
+ - puppet_cd::params
+
+
+
+
+ - Defined in:
+ -
+ manifests/main/user.pp
+
+
+
+
+
Summary
+ Class manages user settings for the puppet_cd module.
+
+
Overview
+
+
+
+
puppet_cd::main::user.pp Module name: puppet_cd Author: Arne Teuke
+(arne_teuke@confdroid)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6
+7
+8
+9
+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/user.pp', line 6
+
+class puppet_cd::main::user (
+
+) inherits puppet_cd::params {
+ if ($fqdn == $pt_pm_fqdn) and ($pt_manage_user == true) {
+ user { $pt_user:
+ ensure => present,
+ name => $pt_user,
+ allowdupe => false,
+ comment => $pt_user_comment,
+ gid => $pt_user,
+ managehome => true,
+ home => $pt_user_home,
+ shell => $pt_user_shell,
+ }
+
+ group { $pt_user:
+ ensure => present,
+ name => $pt_user,
+ allowdupe => false,
+ }
+ }
+
+ if ($fqdn == $pt_db_fqdn) and ($pt_manage_db_user == true) {
+ user { $pt_db_user:
+ ensure => present,
+ name => $pt_db_user,
+ allowdupe => false,
+ comment => $pt_db_user_comment,
+ gid => $pt_db_user,
+ managehome => true,
+ home => $pt_db_user_home,
+ shell => $pt_db_user_shell,
+ }
+
+ group { $pt_db_user:
+ ensure => present,
+ name => $pt_db_user,
+ allowdupe => false,
+ }
+ }
+}
+ |
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/puppet_cd_3A_3Aparams.html b/doc/puppet_classes/puppet_cd_3A_3Aparams.html
index 1696b04..3254a4c 100644
--- a/doc/puppet_classes/puppet_cd_3A_3Aparams.html
+++ b/doc/puppet_classes/puppet_cd_3A_3Aparams.html
@@ -69,6 +69,8 @@
puppet_cd::main::dirs
+
puppet_cd::main::user
+
puppet_cd::main::files
puppet_cd::main::config
@@ -305,6 +307,204 @@ considered a puppet agent.
—
whether to use ssl only.
+
+
+
+
+
+
+ pt_manage_user
+
+
+ (Boolean)
+
+
+ (defaults to: true)
+
+
+ —
+
+
whether to manage the puppet user
+
+
+
+
+
+
+ pt_user
+
+
+ (String)
+
+
+ (defaults to: 'puppet')
+
+
+ —
+
+
+
+
+
+
+ pt_user_comment
+
+
+ (String)
+
+
+ (defaults to: 'puppetserver daemon')
+
+
+ —
+
+
+
+
+
+
+ pt_user_home
+
+
+ (String)
+
+
+ (defaults to: '/opt/puppetlabs/server/data/puppetserver')
+
+
+ —
+
+
+
+
+
+
+ pt_user_shell
+
+
+ (String)
+
+
+ (defaults to: '/sbin/nologin')
+
+
+ —
+
+
+
+
+
+
+ pt_manage_db_user
+
+
+ (Boolean)
+
+
+ (defaults to: true)
+
+
+ —
+
+
whether to manage the user for puppetdb
+
+
+
+
+
+
+ pt_db_user
+
+
+ (String)
+
+
+ (defaults to: 'puppetdb')
+
+
+ —
+
+
+
+
+
+
+ pt_db_user_comment
+
+
+ (String)
+
+
+ (defaults to: 'PuppetDB daemon')
+
+
+ —
+
+
the user comment for puppetdb user
+
+
+
+
+
+
+ pt_db_user_home
+
+
+ (String)
+
+
+ (defaults to: '/opt/puppetlabs/server/data/puppetdb')
+
+
+ —
+
+
the user home for the puppetdb user
+
+
+
+
+
+
+ pt_db_user_shell
+
+
+ (String)
+
+
+ (defaults to: '/sbin/nologin')
+
+
+ —
+
+
the shell for the puppetdb user
+
+
+
+
+
+
+ pt_use_puppetdb
+
+
+ (Boolean)
+
+
+ (defaults to: false)
+
+
+ —
+
+
whether to use puppetdb on host
@@ -320,17 +520,6 @@ considered a puppet agent.
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
29
30
31
@@ -360,47 +549,86 @@ considered a puppet agent.
55
56
57
-58
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
- # File 'manifests/params.pp', line 18
+ # File 'manifests/params.pp', line 29
class puppet_cd::params (
- Boolean $pt_manage_fw = true,
- String $pt_pm_fqdn = 'puppetmaster.example.net',
- String $pt_db_fqdn = 'puppetdb.example.net',
+ Boolean $pt_manage_fw = true,
+ String $pt_pm_fqdn = 'puppetmaster.example.net',
+ String $pt_db_fqdn = 'puppetdb.example.net',
# installation
- String $pt_package_url = 'https://yum.puppet.com/puppet8-release-el-9.noarch.rpm',
- String $pt_pkg_ensure = 'present',
- String $pt_agent_pkg = 'puppet-agent',
- String $pt_server_pkg = 'puppetserver',
- Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
-
- String $pt_no_ssl_port = '8080',
- String $pt_ssl_port = '8081',
- Boolean $pt_use_ssl_only = true,
+ String $pt_package_url = 'https://yum.puppet.com/puppet8-release-el-9.noarch.rpm',
+ String $pt_pkg_ensure = 'present',
+ 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,
+ String $pt_user = 'puppet',
+ String $pt_user_comment = 'puppetserver daemon',
+ String $pt_user_home = '/opt/puppetlabs/server/data/puppetserver',
+ String $pt_user_shell = '/sbin/nologin',
+ ## puppetdb user
+ Boolean $pt_manage_db_user = true,
+ String $pt_db_user = 'puppetdb',
+ String $pt_db_user_comment = 'PuppetDB daemon',
+ String $pt_db_user_home = '/opt/puppetlabs/server/data/puppetdb',
+ String $pt_db_user_shell = '/sbin/nologin',
) {
- $fqdn = $facts['networking']['fqdn']
+ $fqdn = $facts['networking']['fqdn']
# directories
- $pt_main_dir = '/etc/puppetlabs'
- $pt_puppetdir = "${pt_main_dir}/puppet"
- $pt_code_dir = "${pt_main_dir}/code"
- $pt_environmentspath = "${pt_code_dir}/environments"
- $pt_ssldir = "${pt_puppetdir}/ssl"
- $pt_privatekeydir = "${pt_ssldir}/private_keys"
- $pt_rundir = '/var/run/puppetlabs'
- $pt_rundir_master = '/var/run/puppetlabs/puppetserver'
- $pt_vardir = '/opt/puppetlabs/puppet/cache'
- $pt_vardir_master = '/opt/puppetlabs/server/data/puppetserver'
+ $pt_main_dir = '/etc/puppetlabs'
+ $pt_puppetdir = "${pt_main_dir}/puppet"
+ $pt_code_dir = "${pt_main_dir}/code"
+ $pt_environmentspath = "${pt_code_dir}/environments"
+ $pt_ssldir = "${pt_puppetdir}/ssl"
+ $pt_privatekeydir = "${pt_ssldir}/private_keys"
+ $pt_rundir = '/var/run/puppetlabs'
+ $pt_rundir_master = '/var/run/puppetlabs/puppetserver'
+ $pt_vardir = '/opt/puppetlabs/puppet/cache'
+ $pt_vardir_master = '/opt/puppetlabs/server/data/puppetserver'
# service
- $pt_server_service = 'puppetserver'
- $pt_agent_service = 'puppet'
- $pt_db_service = 'puppetdb'
+ $pt_server_service = 'puppetserver'
+ $pt_agent_service = 'puppet'
+ $pt_db_service = 'puppetdb'
#
# includes must be last
diff --git a/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
index 20d505c..4290825 100644
--- a/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
@@ -137,7 +137,8 @@
39
40
41
-42
+42
+43
|
# File 'manifests/server/service.pp', line 6
@@ -158,6 +159,7 @@ class puppet_cd::server::service (
# manage puppet server service
if $fqdn == $pt_pm_fqdn {
require puppet_cd::firewall::iptables
+ require puppet_cd::main::user
service { $pt_server_service:
ensure => running,
|