ansible-role-icinga2/tasks/base.yml

46 lines
1,017 B
YAML

---
- name: install dependencies packages
ansible.builtin.package:
name:
- apt-transport-https
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: add key repository
ansible.builtin.apt_key:
url: https://packages.icinga.com/icinga.key
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: add repository
ansible.builtin.apt_repository:
repo: 'deb https://packages.icinga.com/debian icinga-{{ ansible_distribution_release }} main'
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: install packages
ansible.builtin.package:
name:
- icinga2
- 'icinga2-ido-{{ icinga2_db_type }}'
- icingacli
- monitoring-plugins
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: create certs directory
ansible.builtin.file:
path: /var/lib/icinga2/certs
owner: root
group: nagios
mode: 0750
state: directory
tags: icinga2