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 @@
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.
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_r10kto 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_webhookto 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
manage directories
manage user settings (optional)
+manage puppet user settings (optional)
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.
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_r10kto 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_webhookto 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
manage directories
manage user settings (optional)
+manage puppet user settings (optional)
# 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