mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update main.yml
This commit is contained in:
parent
862c0d9db2
commit
3218bfe09b
1 changed files with 8 additions and 9 deletions
|
@ -5,7 +5,7 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Install chkconfig package -- not in Debian 8
|
- name: Install chkconfig package (debian-8)
|
||||||
package:
|
package:
|
||||||
name: chkconfig
|
name: chkconfig
|
||||||
state: present
|
state: present
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Update main config file
|
- name: Install /etc/monitrc from template
|
||||||
template:
|
template:
|
||||||
backup: yes
|
backup: yes
|
||||||
src: monitrc
|
src: monitrc
|
||||||
|
@ -22,15 +22,14 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
|
||||||
- name: Update config files
|
- name: Install config file /etc/monit.d/watchdog from template
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}"
|
src: watchdog
|
||||||
dest: "/etc/monit.d/{{ item }}"
|
dest: /etc/monit.d/watchdog
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
force: yes
|
force: yes
|
||||||
mode: 0755
|
mode: 0755
|
||||||
with_items: watchdog
|
|
||||||
register: monit_config
|
register: monit_config
|
||||||
when: false
|
when: false
|
||||||
until: monit_config | success
|
until: monit_config | success
|
||||||
|
@ -38,16 +37,16 @@
|
||||||
delay: 1
|
delay: 1
|
||||||
|
|
||||||
#TODO: create systemd script
|
#TODO: create systemd script
|
||||||
- name: Enable 'monit' service
|
- name: Enable 'monit' service (chkconfig monit on)
|
||||||
command: chkconfig monit on
|
command: chkconfig monit on
|
||||||
when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
|
when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
|
||||||
|
|
||||||
#- name: Restart monit service
|
#- name: Restart monit service
|
||||||
# command: service monit restart
|
# command: service monit restart
|
||||||
|
|
||||||
- name: Add 'monit' to list of services at {{ iiab_ini_file }}
|
- name: Add 'monit' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "{{ iiab_ini_file }}"
|
path: "{{ iiab_ini_file }}"
|
||||||
section: monit
|
section: monit
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue