mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
* do a special download and install of usbmount * misspelled iiab_download_url * misspell downloads_dir * diable php-sqlite * php version issues * fixes transferred from recognize branch * local_fact moved * remove preload * remove preload * spell ansible * debian9 sqlite3 * package needs name * remove prepped * use apt ratheer than ansible package for npm * monit disable chkconfig * moodle needs php-zip and php-mbstring * debian9 -> debian-9 * returen to os_ver nomenclature for OS.yml
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
- name: Install monit package
|
|
package: name=monit
|
|
state=present
|
|
tags:
|
|
- download
|
|
|
|
- name: Install chkconfig package -- not in debian 9
|
|
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
|
|
|
|
- name: Update config files
|
|
template: src={{ item }}
|
|
dest=/etc/monit.d/{{ item }}
|
|
owner=root
|
|
group=root
|
|
force=yes
|
|
mode=0755
|
|
with_items: watchdog
|
|
register: monit_config
|
|
when: false
|
|
until: monit_config | success
|
|
retries: 5
|
|
delay: 1
|
|
|
|
#TODO: create systemd script
|
|
- name: Enable monit service
|
|
command: chkconfig monit on
|
|
when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
|
|
|
|
#- 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 }}'
|
|
with_items:
|
|
- option: name
|
|
value: monit
|
|
- option: description
|
|
value: '"Monit is a background service monitor which can correct problems, send email, restart services"'
|
|
- option: enabled
|
|
value: "{{ monit_enabled }}"
|