From 3218bfe09b73b23ed06ccc7df118c36bfec3a337 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 31 Oct 2018 02:36:30 -0400 Subject: [PATCH] Update main.yml --- roles/monit/tasks/main.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/roles/monit/tasks/main.yml b/roles/monit/tasks/main.yml index 512030f14..1c52113df 100644 --- a/roles/monit/tasks/main.yml +++ b/roles/monit/tasks/main.yml @@ -5,7 +5,7 @@ tags: - download -- name: Install chkconfig package -- not in Debian 8 +- name: Install chkconfig package (debian-8) package: name: chkconfig state: present @@ -13,7 +13,7 @@ tags: - download -- name: Update main config file +- name: Install /etc/monitrc from template template: backup: yes src: monitrc @@ -22,15 +22,14 @@ group: root mode: 0600 -- name: Update config files +- name: Install config file /etc/monit.d/watchdog from template template: - src: "{{ item }}" - dest: "/etc/monit.d/{{ item }}" + src: watchdog + dest: /etc/monit.d/watchdog owner: root group: root force: yes mode: 0755 - with_items: watchdog register: monit_config when: false until: monit_config | success @@ -38,16 +37,16 @@ delay: 1 #TODO: create systemd script -- name: Enable 'monit' service +- name: Enable 'monit' service (chkconfig monit on) 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 list of services at {{ iiab_ini_file }} +- name: Add 'monit' variable values to {{ iiab_ini_file }} ini_file: - dest: "{{ iiab_ini_file }}" + path: "{{ iiab_ini_file }}" section: monit option: "{{ item.option }}" value: "{{ item.value }}"