mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
set config location based on os_family
This commit is contained in:
parent
9923fc208a
commit
ffde324038
4 changed files with 10 additions and 7 deletions
|
@ -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
|
||||
|
|
1
tests/integration/targets/monit/vars/RedHat.yml
Normal file
1
tests/integration/targets/monit/vars/RedHat.yml
Normal file
|
@ -0,0 +1 @@
|
|||
monitrc: "/etc/monitrc"
|
1
tests/integration/targets/monit/vars/Suse.yml
Normal file
1
tests/integration/targets/monit/vars/Suse.yml
Normal file
|
@ -0,0 +1 @@
|
|||
monitrc: "/etc/monitrc"
|
1
tests/integration/targets/monit/vars/defaults.yml
Normal file
1
tests/integration/targets/monit/vars/defaults.yml
Normal file
|
@ -0,0 +1 @@
|
|||
monitrc: "/etc/monit/monitrc"
|
Loading…
Add table
Add a link
Reference in a new issue