set config location based on os_family

This commit is contained in:
Simon Kelly 2020-10-19 11:43:39 +02:00
commit ffde324038
4 changed files with 10 additions and 7 deletions

View file

@ -10,17 +10,17 @@
name: monit
state: present
- include_vars: '{{ item }}'
with_first_found:
- files:
- '{{ ansible_os_family }}.yml'
- 'defaults.yml'
- name: monit config
become: yes
template:
src: "monitrc.j2"
dest: "/etc/monit/monitrc"
- name: process monit config
become: yes
template:
src: "httpd_echo.j2"
dest: "/etc/monit/conf.d/httpd_echo"
dest: "{{ monitrc }}"
- name: copy process file
become: yes

View file

@ -0,0 +1 @@
monitrc: "/etc/monitrc"

View file

@ -0,0 +1 @@
monitrc: "/etc/monitrc"

View file

@ -0,0 +1 @@
monitrc: "/etc/monit/monitrc"