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
581e60da20
commit
86a083d375
1 changed files with 27 additions and 22 deletions
|
@ -1,31 +1,35 @@
|
|||
- name: Install Monit package
|
||||
package: name=monit
|
||||
state=present
|
||||
package:
|
||||
name: monit
|
||||
state: present
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Install chkconfig package -- not in Debian 8
|
||||
package: name=chkconfig
|
||||
state=present
|
||||
package:
|
||||
name: chkconfig
|
||||
state: present
|
||||
when: is_debian and ansible_distribution_major_version == "8"
|
||||
tags:
|
||||
- download
|
||||
|
||||
- name: Update main config file
|
||||
template: backup=yes
|
||||
src=monitrc
|
||||
dest=/etc/monitrc
|
||||
owner=root
|
||||
group=root
|
||||
mode=0600
|
||||
template:
|
||||
backup: yes
|
||||
src: monitrc
|
||||
dest: /etc/monitrc
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
|
||||
- name: Update config files
|
||||
template: src={{ item }}
|
||||
dest=/etc/monit.d/{{ item }}
|
||||
owner=root
|
||||
group=root
|
||||
force=yes
|
||||
mode=0755
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/monit.d/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
force: yes
|
||||
mode: 0755
|
||||
with_items: watchdog
|
||||
register: monit_config
|
||||
when: false
|
||||
|
@ -41,14 +45,15 @@
|
|||
#- name: Restart monit service
|
||||
# command: service monit restart
|
||||
|
||||
- name: Add 'monit' to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
section=monit
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
- name: Add 'monit' to list of services at /etc/iiab/iiab.ini
|
||||
ini_file:
|
||||
dest: "{{ service_filelist }}"
|
||||
section: monit
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
with_items:
|
||||
- option: name
|
||||
value: monit
|
||||
value: Monit
|
||||
- option: description
|
||||
value: '"Monit is a background service monitor which can correct problems, send email, restart services."'
|
||||
- option: enabled
|
||||
|
|
Loading…
Add table
Reference in a new issue