Commit 877a0990 authored by Maciej Delmanowski's avatar Maciej Delmanowski

Merge branch 'drybjed-add-icinga-support'

parents 4def0f79 a8d84dd9
Pipeline #25331179 failed with stages
in 206 minutes and 53 seconds
......@@ -582,6 +582,40 @@ stages:
# --- i --- [[[2
'icinga role':
<<: *test_role_1st_deps
variables:
JANE_TEST_PLAY: '${DEBOPS_PLAYBOOKS}/service/apt.yml ${DEBOPS_PLAYBOOKS}/service/pki.yml ${DEBOPS_PLAYBOOKS}/service/icinga.yml'
JANE_INVENTORY_GROUPS: 'debops_service_apt,debops_service_pki,debops_service_icinga'
JANE_DIFF_PATTERN: '.*/debops.icinga/.*'
JANE_LOG_PATTERN: '\[debops\.icinga\]'
'icinga_db/mariadb role':
<<: *test_role_2nd_deps
variables:
JANE_TEST_PLAY: '${DEBOPS_PLAYBOOKS}/service/apt.yml ${DEBOPS_PLAYBOOKS}/service/pki.yml ${DEBOPS_PLAYBOOKS}/service/mariadb_server.yml ${DEBOPS_PLAYBOOKS}/service/icinga.yml ${DEBOPS_PLAYBOOKS}/service/icinga_db.yml'
JANE_INVENTORY_GROUPS: 'debops_service_apt,debops_service_pki,debops_service_mariadb_server,debops_service_icinga,debops_service_icinga_db'
JANE_DIFF_PATTERN: '.*/debops.icinga_db/.*'
JANE_LOG_PATTERN: '\[debops\.icinga_db\]'
'icinga_db/postgresql role':
<<: *test_role_2nd_deps
variables:
JANE_TEST_PLAY: '${DEBOPS_PLAYBOOKS}/service/apt.yml ${DEBOPS_PLAYBOOKS}/service/pki.yml ${DEBOPS_PLAYBOOKS}/service/postgresql_server.yml ${DEBOPS_PLAYBOOKS}/service/icinga.yml ${DEBOPS_PLAYBOOKS}/service/icinga_db.yml'
JANE_INVENTORY_GROUPS: 'debops_service_apt,debops_service_pki,debops_service_postgresql_server,debops_service_icinga,debops_service_icinga_db'
JANE_INVENTORY_HOSTVARS: 'postgresql__delegate_to=localhost'
JANE_DIFF_PATTERN: '.*/debops.icinga_db/.*'
JANE_LOG_PATTERN: '\[debops\.icinga_db\]'
'icinga_web role':
<<: *test_role_3rd_deps
variables:
JANE_TEST_PLAY: '${DEBOPS_PLAYBOOKS}/service/apt.yml ${DEBOPS_PLAYBOOKS}/service/pki.yml ${DEBOPS_PLAYBOOKS}/service/postgresql_server.yml ${DEBOPS_PLAYBOOKS}/service/icinga.yml ${DEBOPS_PLAYBOOKS}/service/icinga_db.yml ${DEBOPS_PLAYBOOKS}/service/icinga_web.yml'
JANE_INVENTORY_GROUPS: 'debops_service_apt,debops_service_pki,debops_service_postgresql_server,debops_service_icinga,debops_service_icinga_db,debops_service_icinga_web'
JANE_INVENTORY_HOSTVARS: 'postgresql__delegate_to=localhost'
JANE_DIFF_PATTERN: '.*/debops.icinga_web/.*'
JANE_LOG_PATTERN: '\[debops\.icinga_web\]'
'ifupdown role':
<<: *test_role_1st_deps
variables:
......
......@@ -41,6 +41,9 @@ Added
Python versions used at the same time. The role is included in the
``common.yml`` playbook.
- Icinga 2 support has been implemented with :ref:`debops.icinga`,
:ref:`debops.icinga_db` and :ref:`debops.icinga_web` Ansible roles.
- [debops.users] Selected UNIX accounts can now be configured to linger when
not logged in via the ``item.linger`` parameter. This allows these accounts
to maintain long-running services when not logged in via their own private
......
---
- name: Configure Icinga service
hosts: [ 'debops_service_icinga' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: debops.icinga/env
tags: [ 'role::icinga', 'role::secret' ]
- role: debops.secret
tags: [ 'role::secret', 'role::icinga' ]
secret__directories:
- '{{ icinga__secret__directories | d([]) }}'
- role: debops.apt_preferences
tags: [ 'role::apt_preferences' ]
apt_preferences__dependent_list:
- '{{ icinga__apt_preferences__dependent_list }}'
- role: debops.etc_services
tags: [ 'role::etc_services' ]
etc_services__dependent_list:
- '{{ icinga__etc_services__dependent_list }}'
- role: debops.ferm
tags: [ 'role::ferm' ]
ferm__dependent_rules:
- '{{ icinga__ferm__dependent_rules }}'
- role: debops.icinga
tags: [ 'role::icinga' ]
---
- name: Configure Icinga database
hosts: [ 'debops_service_icinga_db' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: debops.icinga_db
tags: [ 'role::icinga_db' ]
---
- name: Configure Icinga Web service
hosts: [ 'debops_service_icinga_web' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: debops.php/env
tags: [ 'role::php', 'role::logrotate' ]
- role: debops.apt_preferences
tags: [ 'role::apt_preferences' ]
apt_preferences__dependent_list:
- '{{ php__apt_preferences__dependent_list }}'
- '{{ nginx__apt_preferences__dependent_list }}'
- '{{ postgresql__apt_preferences__dependent_list | d([]) }}'
- role: debops.logrotate
tags: [ 'role::logrotate' ]
logrotate__dependent_config:
- '{{ php__logrotate__dependent_config }}'
- role: debops.ferm
tags: [ 'role::ferm' ]
ferm__dependent_rules:
- '{{ nginx__ferm__dependent_rules }}'
- role: debops.php
tags: [ 'role::php' ]
php__dependent_packages:
- '{{ icinga_web__php__dependent_packages }}'
php__dependent_pools:
- '{{ icinga_web__php__dependent_pools }}'
- role: debops.nginx
tags: [ 'role::nginx' ]
nginx__dependent_servers:
- '{{ icinga_web__nginx__dependent_servers }}'
nginx__dependent_upstreams:
- '{{ icinga_web__nginx__dependent_upstreams }}'
- role: debops.postgresql
tags: [ 'role::postgresql' ]
postgresql__dependent_roles:
- '{{ icinga_web__postgresql__dependent_roles }}'
postgresql__dependent_groups:
- '{{ icinga_web__postgresql__dependent_groups }}'
postgresql__dependent_databases:
- '{{ icinga_web__postgresql__dependent_databases }}'
postgresql__dependent_extensions:
- '{{ icinga_web__postgresql__dependent_extensions }}'
when: icinga_web__database_type == 'postgresql'
- role: debops.mariadb
tags: [ 'role::mariadb' ]
mariadb__dependent_databases:
- '{{ icinga_web__mariadb__dependent_databases }}'
mariadb__dependent_users:
- '{{ icinga_web__mariadb__dependent_users }}'
when: icinga_web__database_type == 'mariadb'
- role: debops.icinga_web
tags: [ 'role::icinga_web' ]
......@@ -54,6 +54,12 @@
- import_playbook: kibana.yml
- import_playbook: icinga.yml
- import_playbook: icinga_db.yml
- import_playbook: icinga_web.yml
- import_playbook: rabbitmq_server.yml
- import_playbook: rabbitmq_management.yml
......
../service/icinga.yml
\ No newline at end of file
../service/icinga_db.yml
\ No newline at end of file
../service/icinga_web.yml
\ No newline at end of file
debops.icinga - Manage Icinga 2 Agent using Ansible
Copyright (C) 2018 Maciej Delmanowski <drybjed@gmail.com>
Copyright (C) 2018 DebOps https://debops.org/
This Ansible role is part of DebOps.
DebOps is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.
DebOps is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DebOps. If not, see https://www.gnu.org/licenses/.
This diff is collapsed.
../defaults
\ No newline at end of file
---
- name: Prepare Icinga environment
set_fact:
icinga__secret__directories: '{{ lookup("template", "lookup/icinga__secret__directories.j2") | from_yaml }}'
../templates
\ No newline at end of file
---
- name: Check icinga2 configuration and restart
command: icinga2 daemon -C
notify: [ 'Restart icinga2' ]
- name: Restart icinga2
service:
name: 'icinga2'
state: 'restarted'
- name: Trigger Icinga Director configuration deployment
uri:
body_format: 'json'
headers:
Accept: 'application/json'
method: 'POST'
url: '{{ icinga__director_deploy_api_url }}'
user: '{{ icinga__director_deploy_api_user }}'
password: '{{ icinga__director_deploy_api_password }}'
run_once: True
when: icinga__director_deploy|bool
no_log: True
---
dependencies:
- role: debops.ansible_plugins
- role: debops.secret
galaxy_info:
author: 'Maciej Delmanowski'
description: 'Manage Icinga 2 installation'
company: 'DebOps'
license: 'GPL-3.0'
min_ansible_version: '2.4.0'
platforms:
- name: Ubuntu
versions:
- xenial
- bionic
- name: Debian
versions:
- jessie
- stretch
- buster
galaxy_tags:
- monitoring
- icinga
- nagios
---
- name: Add upstream Icinga APT key
apt_key:
id: '{{ icinga__upstream_apt_key_id | replace(" ","") }}'
state: 'present'
keyserver: '{{ ansible_local.core.keyserver
if (ansible_local|d() and ansible_local.core|d() and
ansible_local.core.keyserver)
else "hkp://pool.sks-keyservers.net" }}'
when: icinga__upstream|bool
- name: Add upstream Icinga APT repository
apt_repository:
repo: '{{ icinga__upstream_apt_repo }}'
state: 'present'
update_cache: True
when: icinga__upstream|bool
- name: Install required Icinga packages
package:
name: '{{ lookup("flattened",
(icinga__base_packages + icinga__packages),
wantlist=True) }}'
state: 'present'
- name: Add Icinga user to system UNIX groups
user:
name: '{{ icinga__user }}'
groups: '{{ lookup("flattened", icinga__additional_groups, wantlist=True) | join(",") }}'
append: True
notify: [ 'Check icinga2 configuration and restart' ]
- name: Load dependent configuration variables
include_vars:
dir: '{{ secret + "/icinga/dependent_config/" + inventory_hostname }}'
depth: '1'
name: 'icinga__vars_dependent_configuration'
when: (ansible_local|d() and ansible_local.icinga|d() and
(ansible_local.icinga.configured|d())|bool)
- name: Make sure that Ansible local facts directory exists
file:
path: '/etc/ansible/facts.d'
state: 'directory'
owner: 'root'
group: 'root'
mode: '0755'
- name: Save Icinga local facts
template:
src: 'etc/ansible/facts.d/icinga.fact.j2'
dest: '/etc/ansible/facts.d/icinga.fact'
owner: 'root'
group: 'root'
mode: '0755'
register: icinga__register_facts
- name: Update Ansible facts if they were modified
action: setup
when: icinga__register_facts is changed
- name: Check current Icinga diversions
environment:
LC_ALL: 'C'
shell: dpkg-divert --list '/etc/icinga2/*.dpkg-divert' | grep -E '^local diversion' | awk '{print $NF}'
register: icinga__register_diversions
check_mode: False
changed_when: False
- name: Divert Icinga configuration
command: dpkg-divert --quiet --local --divert /etc/icinga2/{{ item.filename | d(item.name | regex_replace('.conf$','') + '.conf') }}.dpkg-divert --rename /etc/icinga2/{{ item.filename | d(item.name | regex_replace('.conf$','') + '.conf') }}
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
notify: [ 'Check icinga2 configuration and restart' ]
when: (item.name|d() and item.state|d('present') not in [ 'absent', 'ignore', 'init', 'feature' ] and (item.divert|d())|bool and
('/etc/icinga2/' + (item.filename | d(item.name | regex_replace('.conf$','') + '.conf')) + '.dpkg-divert' not in icinga__register_diversions.stdout_lines))
- name: Ensure that configuration directories exist
file:
path: '/etc/icinga2/{{ (item.filename | d(item.name | regex_replace(".conf$","") + ".conf")) | dirname }}'
state: 'directory'
owner: 'root'
group: 'root'
mode: '0755'
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
when: (item.name|d() and item.state|d('present') not in [ 'absent', 'ignore', 'init', 'feature' ] and
((item.filename | d(item.name | regex_replace(".conf$","") + ".conf")) | dirname != ''))
- name: Remove Icinga configuration if requested
file:
path: '/etc/icinga2/{{ item.filename | d(item.name | regex_replace(".conf$","") + ".conf") }}'
state: 'absent'
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
notify: [ 'Check icinga2 configuration and restart' ]
when: (item.name|d() and item.state|d('present') == 'absent' and item.divert is undefined)
- name: Generate Icinga configuration files
template:
src: 'etc/icinga2/template.conf.j2'
dest: '/etc/icinga2/{{ item.filename | d(item.name | regex_replace(".conf$","") + ".conf") }}'
owner: '{{ item.owner | d("root") }}'
group: '{{ item.group | d("root") }}'
mode: '{{ item.mode | d("0644") }}'
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
notify: [ 'Check icinga2 configuration and restart' ]
when: (item.name|d() and item.state|d('present') not in [ 'absent', 'ignore', 'init', 'divert', 'feature' ])
no_log: '{{ item.no_log | d(omit) }}'
- name: Revert original Icinga configuration
shell: rm -f /etc/icinga2/{{ item.filename | d(item.name | regex_replace('.conf$','') + '.conf') }} ; dpkg-divert --quiet --local --rename --remove /etc/icinga2/{{ item.filename | d(item.name | regex_replace('.conf$','') + '.conf') }}
args:
warn: False
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
notify: [ 'Check icinga2 configuration and restart' ]
when: (item.name|d() and item.state|d('present') == 'absent' and (item.divert|d())|bool and
('/etc/icinga2/' + (item.filename | d(item.name | regex_replace('.conf$','') + '.conf')) + '.dpkg-divert' in icinga__register_diversions.stdout_lines))
- name: Configure state of Icinga features
file:
path: '/etc/icinga2/features-enabled/{{ item.feature_name }}.conf'
src: '../features-available/{{ item.feature_name }}.conf'
state: '{{ "link" if item.feature_state|d("present") == "present" else "absent" }}'
with_items: '{{ icinga__combined_configuration | parse_kv_items }}'
notify: [ 'Check icinga2 configuration and restart' ]
when: (item.name|d() and item.state|d('present') not in [ 'absent', 'ignore', 'init', 'divert' ] and
item.feature_name|d() and item.feature_state|d())
- name: Copy custom files for Icinga
copy:
content: '{{ item.content | d(omit) }}'
src: '{{ item.src | d(omit) }}'
dest: '{{ item.dest | d(omit) }}'
force: '{{ item.force | d(omit) }}'
owner: '{{ item.owner | d("root") }}'
group: '{{ item.group | d("root") }}'
mode: '{{ item.mode | d("0755") }}'
with_flattened:
- '{{ icinga__custom_files }}'
- '{{ icinga__group_custom_files }}'
- '{{ icinga__host_custom_files }}'
when: ((item.src|d() or item.content|d()) and
item.dest|d() and item.state|d("present") != "absent")
- name: Save dependent configuration on Ansible Controller
template:
src: 'secret/icinga/dependent_config/inventory_hostname/configuration.json.j2'
dest: '{{ secret + "/icinga/dependent_config/" + inventory_hostname + "/configuration.json" }}'
become: False
delegate_to: 'localhost'
- name: Register Icinga node in Icinga Director
uri:
body_format: 'json'
headers:
Accept: 'application/json'
method: 'POST'
body: '{{ icinga__director_register_host_object }}'
url: '{{ icinga__director_register_api_url }}'
user: '{{ icinga__director_register_api_user }}'
password: '{{ icinga__director_register_api_password }}'
status_code: '201,500'
force_basic_auth: True
register: icinga__register_director_host
notify: [ 'Trigger Icinga Director configuration deployment' ]
when: icinga__director_enabled|bool and icinga__director_register|bool and
icinga__node_type != 'master'
changed_when: icinga__register_director_host.status == 201
tags: [ 'role::icinga:register' ]
no_log: True
#!/usr/bin/python{{ '2' if (ansible_python_version is version_compare('3.5', '<')) else '3' }}
# {{ ansible_managed }}
from __future__ import print_function
from json import loads, dumps
from sys import exit
import subprocess
import os
def cmd_exists(cmd):
return any(
os.access(os.path.join(path, cmd), os.X_OK)
for path in os.environ["PATH"].split(os.pathsep)
)
output = loads('''{{ {"installed": False,
"configured": True}
| to_nice_json }}''')
output['installed'] = cmd_exists('icinga2')
try:
icinga_version_stdout = subprocess.check_output(
["dpkg-query", "-W", "-f=${Version}\n'",
"icinga2"]).split('-')[0]
output['version'] = icinga_version_stdout
except Exception:
pass
print(dumps(output, sort_keys=True, indent=4))
{% macro print_comment(comment) %}
{% if (comment | regex_replace('\n$','')).split('\n') | count == 1 %}
{{ comment | regex_replace('\n$','') | comment('plain', decoration='// ', prefix='', postfix='') -}}
{% else %}
{{ comment | regex_replace('\n$','') | comment('plain', decoration=' * ', prefix='/**', postfix=' */\n') -}}
{% endif %}
{% endmacro %}
{{ print_comment(ansible_managed) }}
{% if item.comment|d() %}
{{ print_comment(item.comment) -}}
{% endif %}
{% if item.options|d() %}
{% for element in item.options %}
{% if element.value|d() and element.state|d('present') not in [ 'absent', 'ignore' ] %}
{% if (not loop.first or (loop.first and item.comment|d())) %}
{% endif %}
{% if element.comment|d() %}
{{ print_comment(element.comment) -}}
{% endif %}
{% if element.state|d('present') == 'comment' %}
/*
{% endif %}
{{ element.value | regex_replace('\n$','') }}
{% if element.state|d('present') == 'comment' %}
*/
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if item.value|d() %}
{% if item.state|d('present') == 'comment' %}
/*
{% endif %}
{{ item.value | regex_replace('\n$','') }}
{% if item.state|d('present') == 'comment' %}
*/
{% endif %}
{% endif %}
{% set icinga__tpl_dependent_configuration = {} %}
{% if icinga__vars_dependent_configuration|d() %}
{% set _ = icinga__tpl_dependent_configuration.update(icinga__vars_dependent_configuration) %}
{% endif %}
{% if icinga__dependent_configuration %}
{% set icinga__tpl_flattened_configuration = lookup('flattened', icinga__dependent_configuration) %}
{% for element in ([ icinga__tpl_flattened_configuration ] if icinga__tpl_flattened_configuration is mapping else icinga__tpl_flattened_configuration) %}
{% if element.role|d() and element.config|d() %}
{% if element.state|d('present') not in [ 'ignore', 'absent' ] %}
{% set flattened_config = lookup('flattened', element.config) %}
{% set _ = icinga__tpl_dependent_configuration.update({
element.role: ([ flattened_config ] if flattened_config is mapping else flattened_config)
}) %}
{% elif element.state|d('present') == 'absent' %}
{% set _ = icinga__tpl_dependent_configuration.pop(element.role, None) %}
{% endif %}
{% elif element is mapping and 'role' not in element.keys() and 'config' not in element.keys() %}
{% for role, config in element.items() %}
{% set flattened_config = lookup('flattened', config) %}
{% set _ = icinga__tpl_dependent_configuration.update({
role: ([ flattened_config ] if flattened_config is mapping else flattened_config)
}) %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% set icinga__tpl_output_configuration = [] %}
{% for key, value in icinga__tpl_dependent_configuration.items() %}
{% set _ = icinga__tpl_output_configuration.extend(value) %}
{% endfor %}
{{ icinga__tpl_output_configuration | to_yaml }}
{% for host in play_hosts %}
- 'icinga/dependent_config/{{ host }}'
{% endfor %}
{% set icinga__tpl_dependent_configuration = {} %}
{% if icinga__vars_dependent_configuration|d() %}
{% set _ = icinga__tpl_dependent_configuration.update(icinga__vars_dependent_configuration) %}
{% endif %}
{% if icinga__dependent_configuration %}
{% set icinga__tpl_flattened_configuration = lookup('flattened', icinga__dependent_configuration) %}
{% for element in ([ icinga__tpl_flattened_configuration ] if icinga__tpl_flattened_configuration is mapping else icinga__tpl_flattened_configuration) %}
{% if element.role|d() and element.config|d() %}
{% if element.state|d('present') not in [ 'ignore', 'absent' ] %}
{% set flattened_config = lookup('flattened', element.config) %}
{% set _ = icinga__tpl_dependent_configuration.update({
element.role: ([ flattened_config ] if flattened_config is mapping else flattened_config)
}) %}
{% elif element.state|d('present') == 'absent' %}
{% set _ = icinga__tpl_dependent_configuration.pop(element.role, None) %}
{% endif %}
{% elif element is mapping and 'role' not in element.keys() and 'config' not in element.keys() %}
{% for role, config in element.items() %}
{% set flattened_config = lookup('flattened', config) %}
{% set _ = icinga__tpl_dependent_configuration.update({
role: ([ flattened_config ] if flattened_config is mapping else flattened_config)
}) %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{{ icinga__tpl_dependent_configuration | to_nice_json }}
debops.icinga_db - Manage Icinga 2 database using Ansible
Copyright (C) 2018 Maciej Delmanowski <drybjed@gmail.com>
Copyright (C) 2018 DebOps https://debops.org/
This Ansible role is part of DebOps.
DebOps is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.
DebOps is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DebOps. If not, see https://www.gnu.org/licenses/.
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# debops.icinga_db default variables
# ==================================
# .. contents:: Sections
# :local:
# General configuration [[[
# -------------------------
# .. envvar:: icinga_db__icinga_installed [[[
#
# Variable which defines if Icinga 2 has been installed on the host. If it's
# not installed, the role will not perform the database configuration.
#
# You should install Icinga with the :ref:`debops.icinga` role before
# configuring a database for it. The default DebOps playbook should do that
# automatically if the main Icinga role is enabled on a host.
icinga_db__icinga_installed: '{{ True
if (ansible_local|d() and ansible_local.icinga|d() and
(ansible_local.icinga.installed|d())|bool)
else False }}'
# ]]]
# .. envvar:: icinga_db__type [[[
#
# The database type to configure for Icinga 2, either PostgreSQL (preferred) or
# MariaDB/MySQL. Debian installation supports only one database type at a time.
icinga_db__type: '{{ ansible_local.icinga_db.type
if (ansible_local|d() and ansible_local.icinga_db|d() and
ansible_local.icinga_db.type|d())
else ("postgresql"
if (ansible_local|d() and ansible_local.postgresql is defined)
else ("mariadb"
if (ansible_local|d() and ansible_local.mariadb is defined)
else "unknown")) }}'
# ]]]
# .. envvar:: icinga_db__feature [[[
#
# Name of the IDO feature to enable for Icinga 2. This should correspond with
# the selected database type.
icinga_db__feature: '{{ "ido-pgsql"
if (icinga_db__type == "postgresql")
else ("ido-mysql"
if (icinga_db__type == "mariadb")
else "unknown") }}'
# ]]]
# ]]]
# APT packages [[[
# ----------------
# .. envvar:: icinga_db__base_packages [[[
#
# The list of APT packages to install for Icinga 2 database support. The
# database configuration will be performed by the ``dbconfig`` infrastructure.
icinga_db__base_packages:
- '{{ "icinga2-ido-pgsql"
if (icinga_db__type == "postgresql")
else ("icinga2-ido-mysql"
if (icinga_db__type == "mariadb")
else []) }}'
# ]]]
# .. envvar:: icinga_db__packages [[[
#
# List of additional APT packages to install with Icinga 2 database support.
icinga_db__packages: []
# ]]]
# ]]]