summaryrefslogtreecommitdiff
path: root/sitemodules
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-07-21 14:47:15 +0200
committerJan Dittberner <jandd@cacert.org>2019-07-21 14:47:15 +0200
commit601b7f575aed0ae09dd2e62b8c179dede4110643 (patch)
treefb008d048824b4044974f5baa746d3019570543c /sitemodules
parentbaba6b1ef4571ade000bddc5ee84df0f8df70b6a (diff)
downloadcacert-puppet-601b7f575aed0ae09dd2e62b8c179dede4110643.tar.gz
cacert-puppet-601b7f575aed0ae09dd2e62b8c179dede4110643.tar.xz
cacert-puppet-601b7f575aed0ae09dd2e62b8c179dede4110643.zip
Change icinga2_master role to use icinga2 module
Diffstat (limited to 'sitemodules')
-rw-r--r--sitemodules/profiles/manifests/icinga2_master.pp23
1 files changed, 21 insertions, 2 deletions
diff --git a/sitemodules/profiles/manifests/icinga2_master.pp b/sitemodules/profiles/manifests/icinga2_master.pp
index ece3674..e200fb3 100644
--- a/sitemodules/profiles/manifests/icinga2_master.pp
+++ b/sitemodules/profiles/manifests/icinga2_master.pp
@@ -33,8 +33,7 @@
#
# Copyright 2019 Jan Dittberner
class profiles::icinga2_master (
- String $web2_database_name,
- String $web2_database_user,
+ String $ido_database_password,
String $web2_database_password,
Array[Hash[String, Variant[String, Tuple[String, 1]]]] $api_users,
String $ca_key,
@@ -43,6 +42,26 @@ class profiles::icinga2_master (
) {
include 'profiles::icinga2_common'
+ class { '::icinga2::feature::api':
+ endpoints => {
+ $::fqdn => {},
+ },
+ zones => {
+ $::fqdn => {
+ 'endpoints' => [$::fqdn],
+ },
+ },
+ }
+
+ postgresql::server::db { 'icinga2':
+ user => 'icinga2',
+ password => postgresql_password('icinga2', $ido_database_password),
+ }
+
+ icinga2::object::zone { 'global-templates':
+ global => true,
+ }
+
file { '/var/cache/debconf/icinga2-ido-pgsql.preseed':
ensure => file,
source => 'puppet:///modules/profiles/icinga2_master/icinga2-ido-pgsql.preseed',