summaryrefslogtreecommitdiff
path: root/sitemodules
diff options
context:
space:
mode:
Diffstat (limited to 'sitemodules')
-rw-r--r--sitemodules/profiles/manifests/icinga2_master.pp105
-rw-r--r--sitemodules/profiles/templates/icinga2_master/icinga2-ido-pgsql.preseed.epp12
-rw-r--r--sitemodules/roles/manifests/puppetmaster.pp2
3 files changed, 26 insertions, 93 deletions
diff --git a/sitemodules/profiles/manifests/icinga2_master.pp b/sitemodules/profiles/manifests/icinga2_master.pp
index f1764e0..42a5a3f 100644
--- a/sitemodules/profiles/manifests/icinga2_master.pp
+++ b/sitemodules/profiles/manifests/icinga2_master.pp
@@ -17,10 +17,6 @@
# Icinga2 node authentication
# @param api_users Icinga2 API users
# @param ca_key Icinga2 CA private key content
-# @param host_key Icinga2 host private key content
-# @param host_certificate Icinga2 host certificate content
-# @param host_csr Icinga2 host certificate signing request
-# content
#
# Examples
# --------
@@ -49,72 +45,24 @@ class profiles::icinga2_master (
String $icinga2_ticket_salt,
Array[Hash[String, Variant[String, Tuple[String, 1]]]] $api_users,
String $ca_key,
- String $host_key,
- String $host_certificate,
- String $host_csr,
) {
include 'profiles::icinga2_common'
- debconf { 'icinga2-ido-pgsql/pgsql/app-pass':
- package => 'icinga2-ido-pgsql',
- type => 'password',
- value => $ido_database_password,
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/app-password-confirm':
- package => 'icinga2-ido-pgsql',
- type => 'password',
- value => $ido_database_password,
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/remote/host':
- package => 'icinga2-ido-pgsql',
- value => 'localhost',
- type => 'string',
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/db/dbname':
- package => 'icinga2-ido-pgsql',
- value => $ido_database_name,
- type => 'string',
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/db/app-user':
- package => 'icinga2-ido-pgsql',
- value => "${ido_database_user}@localhost",
- type => 'string',
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/enable':
- package => 'icinga2-ido-pgsql',
- type => 'boolean',
- value => 'true', # lint:ignore:quoted_booleans
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/dbconfig-reinstall':
- package => 'icinga2-ido-pgsql',
- type => 'boolean',
- value => 'false', # lint:ignore:quoted_booleans
- seen => true,
- }
- debconf { 'icinga2-ido-pgsql/dbconfig-install':
- package => 'icinga2-ido-pgsql',
- type => 'boolean',
- value => 'true', # lint:ignore:quoted_booleans
- seen => true,
+ file { '/var/cache/debconf/icinga2-ido-pgsql.preseed':
+ ensure => file,
+ content => epp('profiles/icinga2_master/icinga2-ido-pgsql.preseed.epp', {
+ dbname => $ido_database_name,
+ dbuser => $ido_database_user,
+ dbpassword => $ido_database_password,
+ },
+ owner => 'root',
+ group => 'root',
+ mode => '0600',
}
package { 'icinga2-ido-pgsql':
- ensure => latest,
- require => [
- Debconf['icinga2-ido-pgsql/pgsql/app-pass'],
- Debconf['icinga2-ido-pgsql/app-password-confirm'],
- Debconf['icinga2-ido-pgsql/remote/host'],
- Debconf['icinga2-ido-pgsql/db/dbname'],
- Debconf['icinga2-ido-pgsql/db/app-user'],
- Debconf['icinga2-ido-pgsql/enable'],
- Debconf['icinga2-ido-pgsql/dbconfig-reinstall'],
- Debconf['icinga2-ido-pgsql/dbconfig-install'],
- ],
+ ensure => latest,
+ responsefile => '/var/cache/debconf/icinga2-ido-pgsql.preseed',
+ require => File['/var/cache/debconf/icinga2-ido-pgsql.preseed'],
}
file { '/etc/icinga2/constants.conf':
ensure => file,
@@ -247,30 +195,6 @@ class profiles::icinga2_master (
mode => '0644',
require => File['/var/lib/icinga2/ca'],
}
- file { "/etc/icinga2/pki/${facts['fqdn']}.key":
- ensure => file,
- content => $host_key,
- owner => 'nagios',
- group => 'nagios',
- mode => '0600',
- require => File['/etc/icinga2/pki'],
- }
- file { "/etc/icinga2/pki/${facts['fqdn']}.crt":
- ensure => file,
- content => $host_certificate,
- owner => 'nagios',
- group => 'nagios',
- mode => '0644',
- require => File['/etc/icinga2/pki'],
- }
- file { "/etc/icinga2/pki/${facts['fqdn']}.csr":
- ensure => file,
- content => $host_csr,
- owner => 'nagios',
- group => 'nagios',
- mode => '0644',
- require => File['/etc/icinga2/pki'],
- }
service { 'icinga2':
ensure => 'running',
enable => true,
@@ -290,9 +214,6 @@ class profiles::icinga2_master (
File['/var/lib/icinga2/ca/ca.crt'],
File['/etc/icinga2/pki'],
File['/etc/icinga2/pki/ca.crt'],
- File["/etc/icinga2/pki/${facts['fqdn']}.key"],
- File["/etc/icinga2/pki/${facts['fqdn']}.crt"],
- File["/etc/icinga2/pki/${facts['fqdn']}.csr"],
],
}
}
diff --git a/sitemodules/profiles/templates/icinga2_master/icinga2-ido-pgsql.preseed.epp b/sitemodules/profiles/templates/icinga2_master/icinga2-ido-pgsql.preseed.epp
new file mode 100644
index 0000000..1be594e
--- /dev/null
+++ b/sitemodules/profiles/templates/icinga2_master/icinga2-ido-pgsql.preseed.epp
@@ -0,0 +1,12 @@
+<%-| String $dbname,
+ String $dbuser,
+ String $dbpassword
+|-%>
+icinga2-ido-pgsql icinga2-ido-pgsql/app-password-confirm password <%= $dbpassword %>
+icinga2-ido-pgsql icinga2-ido-pgsql/pgsql/app-pass password <%= $dbpassword %>
+icinga2-ido-pgsql icinga2-ido-pgsql/db/dbname string <%= $dbname %>
+icinga2-ido-pgsql icinga2-ido-pgsql/db/app-user string <%= $dbuser %>@@localhost
+icinga2-ido-pgsql icinga2-ido-pgsql/remote/host string localhost
+icinga2-ido-pgsql icinga2-ido-pgsql/dbconfig-reinstall boolean false
+icinga2-ido-pgsql icinga2-ido-pgsql/enable boolean true
+icinga2-ido-pgsql icinga2-ido-pgsql/dbconfig-install boolean true
diff --git a/sitemodules/roles/manifests/puppetmaster.pp b/sitemodules/roles/manifests/puppetmaster.pp
index b839cdb..6074c75 100644
--- a/sitemodules/roles/manifests/puppetmaster.pp
+++ b/sitemodules/roles/manifests/puppetmaster.pp
@@ -24,6 +24,6 @@ class roles::puppetmaster {
include profiles::base
include profiles::rsyslog
include profiles::nrpe_agent
- include profiles::icinga2_agent
+ #include profiles::icinga2_agent
include profiles::puppet_server
}