1
0
Fork 0
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:
A Holt 2017-12-08 05:15:38 -05:00 committed by GitHub
parent 581e60da20
commit 86a083d375
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,31 +1,35 @@
- name: Install Monit package - name: Install Monit package
package: name=monit package:
state=present name: monit
state: present
tags: tags:
- download - download
- name: Install chkconfig package -- not in Debian 8 - name: Install chkconfig package -- not in Debian 8
package: name=chkconfig package:
state=present name: chkconfig
state: present
when: is_debian and ansible_distribution_major_version == "8" when: is_debian and ansible_distribution_major_version == "8"
tags: tags:
- download - download
- name: Update main config file - name: Update main config file
template: backup=yes template:
src=monitrc backup: yes
dest=/etc/monitrc src: monitrc
owner=root dest: /etc/monitrc
group=root owner: root
mode=0600 group: root
mode: 0600
- name: Update config files - name: Update config files
template: src={{ item }} template:
dest=/etc/monit.d/{{ item }} src: "{{ item }}"
owner=root dest: "/etc/monit.d/{{ item }}"
group=root owner: root
force=yes group: root
mode=0755 force: yes
mode: 0755
with_items: watchdog with_items: watchdog
register: monit_config register: monit_config
when: false when: false
@ -41,14 +45,15 @@
#- name: Restart monit service #- name: Restart monit service
# command: service monit restart # command: service monit restart
- name: Add 'monit' to service list - name: Add 'monit' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=monit dest: "{{ service_filelist }}"
option='{{ item.option }}' section: monit
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: monit value: Monit
- option: description - option: description
value: '"Monit is a background service monitor which can correct problems, send email, restart services."' value: '"Monit is a background service monitor which can correct problems, send email, restart services."'
- option: enabled - option: enabled