diff --git a/.vscode/settings.json b/.vscode/settings.json index d0e945d..26d331a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ "levelname", "logappender", "NOFILE", + "Puppetfile", "pydantic", "pylint", "pytest", diff --git a/README.md b/README.md index e677927..1ae5c2e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Synopsis This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle. -The syntax etc is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. +The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman. ## WARNING @@ -16,11 +16,16 @@ This module is also designed to work with External Node Classifiers (ENC), for i ## Features -* install packages depending on whether the host fqdn equals either master fqdn, db fqdn or none (agent). +* if the host FQDN matches your specified Puppet master via `$pt_pm_fqdn`, it installs and configures a puppetmaster. +On your puppetmaster, If you set `$pt_use_r10k`to `true`, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile. +If you set `$pt_use_r10k_webhook`to `true`, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment. + +* if the host FQDN matches your specified puppetdb host via `$pt_db_fqdn`, Puppetdb is installed and added to the puppetmaster config. Settings for the (external) postgreSQL database are also configured. + * open firewall ports depending on fqdn choices * start services as required * manage directories -* manage user settings (optional) +* manage puppet user settings (optional) ## Support diff --git a/doc/file.README.html b/doc/file.README.html index 22a8359..2446fa6 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -66,7 +66,7 @@

Synopsis

-

This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle. The syntax etc is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

+

This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle. The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

WARNING

@@ -74,7 +74,9 @@

Features

Support

diff --git a/doc/index.html b/doc/index.html index c7651e8..3b66c1d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -66,7 +66,7 @@

Synopsis

-

This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle. The syntax etc is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

+

This Puppet module configures settings for Puppet master and agents, PuppetDB and R10k, the full bundle. The syntax is specifically for Puppet Core 8 and Rocky 9, although might work elsewhere as well. This module is also designed to work with External Node Classifiers (ENC), for instance Foreman.

WARNING

@@ -74,7 +74,9 @@

Features

Support

diff --git a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Aservice.html b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Aservice.html index 70af012..8cf440f 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Aservice.html +++ b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Aservice.html @@ -122,10 +122,10 @@ class puppet_cd::puppetdb::service ( ) inherits puppet_cd::params { - if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) { + if ($fqdn == $pt_db_fqdn) and ($pt_use_puppetdb == true) { require puppet_cd::puppetdb::files - service { $pt_puppetdb: + service { $pt_db_service: ensure => running, hasstatus => true, hasrestart => true, 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 c7784be..6fa6039 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html +++ b/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html @@ -137,19 +137,7 @@ 39 40 41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 +42
# File 'manifests/server/service.pp', line 6
@@ -180,18 +168,6 @@ class puppet_cd::server::service (
     }
   }
 
-  # manage puppetdb service
-  if $fqdn == $pt_db_fqdn {
-    require puppet_cd::firewall::iptables
-
-    service { $pt_db_service:
-      ensure     => running,
-      hasstatus  => true,
-      hasrestart => true,
-      enable     => true,
-    }
-  }
-
   # manage webhook service
   if $pt_use_r10k_webhook == true {
     require puppet_cd::r10k::install
diff --git a/manifests/puppetdb/service.pp b/manifests/puppetdb/service.pp
index dbdcea0..7c776a6 100644
--- a/manifests/puppetdb/service.pp
+++ b/manifests/puppetdb/service.pp
@@ -6,10 +6,10 @@
 class puppet_cd::puppetdb::service (
 
 ) inherits puppet_cd::params {
-  if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) {
+  if ($fqdn == $pt_db_fqdn) and ($pt_use_puppetdb == true) {
     require puppet_cd::puppetdb::files
 
-    service { $pt_puppetdb:
+    service { $pt_db_service:
       ensure     => running,
       hasstatus  => true,
       hasrestart => true,
diff --git a/manifests/server/service.pp b/manifests/server/service.pp
index 8a118a8..ce306a5 100644
--- a/manifests/server/service.pp
+++ b/manifests/server/service.pp
@@ -29,18 +29,6 @@ class puppet_cd::server::service (
     }
   }
 
-  # manage puppetdb service
-  if $fqdn == $pt_db_fqdn {
-    require puppet_cd::firewall::iptables
-
-    service { $pt_db_service:
-      ensure     => running,
-      hasstatus  => true,
-      hasrestart => true,
-      enable     => true,
-    }
-  }
-
   # manage webhook service
   if $pt_use_r10k_webhook == true {
     require puppet_cd::r10k::install