summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-07-21 17:11:25 +0200
committerJan Dittberner <jandd@cacert.org>2019-07-21 17:11:25 +0200
commit913aa7d80c93428091ecdc98c3f7eeffbebe7041 (patch)
treeecd97ab9096767d75bc522a54380da4c07dea2d7
parent12eca1ee120f13ed944a8789a7bf5c4d5200897e (diff)
downloadcacert-puppet-913aa7d80c93428091ecdc98c3f7eeffbebe7041.tar.gz
cacert-puppet-913aa7d80c93428091ecdc98c3f7eeffbebe7041.tar.xz
cacert-puppet-913aa7d80c93428091ecdc98c3f7eeffbebe7041.zip
Add Icingaweb2
-rw-r--r--Puppetfile1
-rw-r--r--sitemodules/profiles/manifests/icinga2_common.pp2
-rw-r--r--sitemodules/profiles/manifests/icinga2_master.pp34
3 files changed, 37 insertions, 0 deletions
diff --git a/Puppetfile b/Puppetfile
index 5460b49..a1c594b 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -1,4 +1,5 @@
mod 'icinga/icinga2', :latest
+mod 'icinga/icingaweb2', :latest
mod 'puppetlabs/apt', :latest
mod 'puppetlabs/concat', :latest
mod 'puppetlabs/mailalias_core', :latest
diff --git a/sitemodules/profiles/manifests/icinga2_common.pp b/sitemodules/profiles/manifests/icinga2_common.pp
index 829994b..be6ffa8 100644
--- a/sitemodules/profiles/manifests/icinga2_common.pp
+++ b/sitemodules/profiles/manifests/icinga2_common.pp
@@ -31,6 +31,8 @@ class profiles::icinga2_common (
'icinga2-doc',
'icinga2-ido-pgsql',
'libicinga2',
+ 'icingaweb2',
+ 'icingaweb2-common',
],
priority => 500,
release => 'stretch-backports',
diff --git a/sitemodules/profiles/manifests/icinga2_master.pp b/sitemodules/profiles/manifests/icinga2_master.pp
index e6db26d..fe57804 100644
--- a/sitemodules/profiles/manifests/icinga2_master.pp
+++ b/sitemodules/profiles/manifests/icinga2_master.pp
@@ -87,4 +87,38 @@ class profiles::icinga2_master (
Icinga2::Object::Zone <<| |>> ~> Service['icinga2']
Icinga2::Object::Endpoint <<| |>> ~> Service['icinga2']
+
+ postgresql::server::db { 'icingaweb2':
+ user => 'icingaweb2',
+ password => postgresql_password(
+ 'icingaweb2', $web2_database_password
+ ),
+ }
+
+ class { '::icingaweb2':
+ manage_repo => false,
+ import_schema => true,
+ db_type => 'pgsql',
+ db_host => 'localhost',
+ db_port => '5432',
+ db_username => 'icingaweb2',
+ db_password => $web2_database_password,
+ require => Postgresql::Server::Db['icingaweb2'],
+ }
+
+ class { '::icingaweb2::module::monitoring',
+ ido_type => 'pgsql',
+ ido_host => 'localhost',
+ ido_port => 5432,
+ ido_db_name => 'icinga2',
+ ido_db_username => 'icinga2',
+ ido_db_password => $ido_database_password,
+ commandtransports => {
+ icinga2 => {
+ transport => 'api',
+ username => 'root',
+ password => $api_users['root']['password'],
+ }
+ }
+ }
}