add nagios to docker if exists

This commit is contained in:
Antonio J. Delgado 2022-11-24 12:27:59 +02:00
parent 28089bcd39
commit a690343336

View file

@ -1,13 +1,15 @@
--- ---
# - name: Ensure Nagios is configured - name: Check if docker group exists
# template: shell: grep docker /etc/groups
# dest: /etc/nagios4/nagios.cfg register: docker_group
# src: templates/nagios.cfg.j2
# owner: "{{ nagios_user }}" - name: Add nagios to docker group if it exists
# group: "{{ nagios_group }}" user:
# mode: 0660 name: nagios
# backup: yes append: true
# notify: Restart Nagios4 groups:
- docker
when: docker_group.rc == 0
- name: Ensure folder for Nagios configurations exists - name: Ensure folder for Nagios configurations exists
file: file: