ansible-role-icinga2/tasks/base.yml

48 lines
1 KiB
YAML
Raw Normal View History

2021-01-03 15:10:04 +00:00
---
- name: install dependencies packages
2021-08-15 16:15:12 +00:00
ansible.builtin.package:
name:
- apt-transport-https
2021-08-15 16:56:36 +00:00
- gpg
2021-01-03 15:10:04 +00:00
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: add key repository
2021-08-15 16:15:12 +00:00
ansible.builtin.apt_key:
2021-01-03 15:10:04 +00:00
url: https://packages.icinga.com/icinga.key
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: add repository
2021-08-15 16:15:12 +00:00
ansible.builtin.apt_repository:
2021-01-03 15:10:04 +00:00
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
2021-08-15 16:15:12 +00:00
ansible.builtin.package:
2021-01-03 15:10:04 +00:00
name:
- icinga2
- 'icinga2-ido-{{ icinga2_db_type }}'
- icingacli
- monitoring-plugins
retries: 2
register: result
until: result is succeeded
tags: icinga2
- name: create certs directory
2021-08-15 16:15:12 +00:00
ansible.builtin.file:
2021-01-03 15:10:04 +00:00
path: /var/lib/icinga2/certs
owner: root
group: nagios
mode: 0750
state: directory
tags: icinga2