diff options
-rw-r--r-- | galaxy.yml | 2 | ||||
-rw-r--r-- | roles/icinga2/Readme.md | 38 | ||||
-rw-r--r-- | roles/icinga2/defaults/main.yml | 11 | ||||
-rw-r--r-- | roles/icinga2/tasks/icinga.yml | 1 | ||||
-rw-r--r-- | roles/icinga2/templates/constants.conf.j2 | 10 |
5 files changed, 56 insertions, 6 deletions
@@ -1,6 +1,6 @@ namespace: kompetenzbolzen name: stuff -version: 0.9.0 +version: 0.9.1 readme: README.md authors: - Jonas Gunz <himself@jonasgunz.de> diff --git a/roles/icinga2/Readme.md b/roles/icinga2/Readme.md index 05969c7..6f7be6d 100644 --- a/roles/icinga2/Readme.md +++ b/roles/icinga2/Readme.md @@ -1,6 +1,8 @@ # icinga2 -Installs Icinga2 Monitor standalone node and Icingaweb2 with integrated MariaDB Databse +Installs Icinga2 Monitor standalone node and Icingaweb2 with integrated MariaDB Database. + +Als configures postfix to relay specific mails to SMTP gateway Default settings @@ -9,16 +11,39 @@ Default settings icinga_ido_db_pw: 'changeme' icinga_web_db_pw: 'changeme' + icinga: # icingaweb2 api user is created automatically with random password api_users: - name: 'test' password: 'changeme' permissions: '[ ]' + # CN MUST match FQDN + api_cert: + crt: '/etc/ssl/cert/ssl-cert-snakeoil.pem' + key: '/etc/ssl/private/ssl-cert-snakeoil.key' + ca: '/etc/ssl/certs/ca-certificates.crt' + config: + manage: false + git_url: '' + git_version: 'mainu' + mail: + enable: false + smtp_host: 'smtp.example.com' + smtp_port: '25' + smtp_user: '' + smtp_psw: '' + from: '' + constants: + TicketSalt: '' + NodeName: '{{ ansible_facts.fqdn }}' + ZoneName: '{{ ansible_facts.fqdn }}' + PluginDir: '/usr/lib/nagios/plugins' + ManubulonPluginDir: '/usr/lib/nagios/plugins' + PluginContribDir: '/usr/lib/nagios/plugins' icingaweb: cert: - use_ssl: true cert: '/etc/ssl/cert/ssl-cert-snakeoil.pem' key: '/etc/ssl/private/ssl-cert-snakeoil.key' ldap: @@ -35,7 +60,8 @@ icingaweb: filter: '' groups: base_dn: '' - group_member_attribute: 'cn' + group_member_attribute: 'member' + group_name_attribute: 'cn' group_class: 'groupOfNames' group_filter: 'cn=*' user_base_dn: '' @@ -48,4 +74,10 @@ icingaweb: groups: 'Administrators' enabled_modules: - monitoring + - businessprocess + install_modules: + businessprocess: + url: 'https://github.com/Icinga/icingaweb2-module-businessprocess' + version: 'master' + ``` diff --git a/roles/icinga2/defaults/main.yml b/roles/icinga2/defaults/main.yml index 0c36ee6..7e4e5bc 100644 --- a/roles/icinga2/defaults/main.yml +++ b/roles/icinga2/defaults/main.yml @@ -17,7 +17,7 @@ icinga: config: manage: false git_url: '' - git_branch: 'mainu' + git_version: 'mainu' mail: enable: false smtp_host: 'smtp.example.com' @@ -25,6 +25,13 @@ icinga: smtp_user: '' smtp_psw: '' from: '' + constants: + TicketSalt: '' + NodeName: '{{ ansible_facts.fqdn }}' + ZoneName: '{{ ansible_facts.fqdn }}' + PluginDir: '/usr/lib/nagios/plugins' + ManubulonPluginDir: '/usr/lib/nagios/plugins' + PluginContribDir: '/usr/lib/nagios/plugins' icingaweb: cert: @@ -49,7 +56,7 @@ icingaweb: group_class: 'groupOfNames' group_filter: 'cn=*' user_base_dn: '' - user_class: 'posixAccount' + user_class: 'inetOrgPerson' user_name_attribute: 'uid' roles: - name: Administrators diff --git a/roles/icinga2/tasks/icinga.yml b/roles/icinga2/tasks/icinga.yml index 7acbb47..239b5e2 100644 --- a/roles/icinga2/tasks/icinga.yml +++ b/roles/icinga2/tasks/icinga.yml @@ -46,6 +46,7 @@ loop: - ido-mysql.conf - api_users.conf + - constants.conf - name: Install config from git git: diff --git a/roles/icinga2/templates/constants.conf.j2 b/roles/icinga2/templates/constants.conf.j2 new file mode 100644 index 0000000..18e8e90 --- /dev/null +++ b/roles/icinga2/templates/constants.conf.j2 @@ -0,0 +1,10 @@ +/** +* vi: ft=icinga2 +* This File is managed by Ansible. Do NOT change. +*/ + +{% for const in icinga.constants %} + +const {{ const }} = "{{ icinga.constants[ const ] }}" + +{% endfor %} |