1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/monit/tasks/install.yml

47 lines
1 KiB
YAML
Raw Normal View History

2019-02-03 00:37:14 +00:00
- name: Install 'monit' package
2017-12-08 10:15:38 +00:00
package:
name: monit
state: present
2017-05-27 18:09:50 +00:00
# - name: Install chkconfig package (debian-8)
# package:
# name: chkconfig
# state: present
# when: is_debian and ansible_distribution_major_version == "8"
2017-05-27 18:09:50 +00:00
2021-05-16 20:56:03 +00:00
#- name: Install /etc/monitrc from template
# template:
# backup: yes
# src: monitrc
# dest: /etc/monitrc
#owner: root
#group: root
2021-05-16 20:56:03 +00:00
# mode: '0600'
2017-05-27 18:09:50 +00:00
# - name: Install config file /etc/monit.d/watchdog from template (NEVER RUNS, WHY?)
# template:
# src: watchdog
# dest: /etc/monit.d/watchdog
# owner: root
# group: root
# force: yes
# mode: '0755'
# register: monit_config
# when: False # IS THIS A BUG ?
# until: monit_config | success
# retries: 5
# delay: 1
2017-05-27 18:09:50 +00:00
2020-01-30 09:00:00 +00:00
# RECORD Monit AS INSTALLED
- name: "Set 'monit_installed: True'"
set_fact:
monit_installed: True
- name: "Add 'monit_installed: True' to {{ iiab_state_file }}"
lineinfile:
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
regexp: '^monit_installed'
line: 'monit_installed: True'