Minor change
This commit is contained in:
parent
1a7b5b24b7
commit
de4f590585
1 changed files with 14 additions and 28 deletions
|
@ -34,35 +34,18 @@
|
|||
mode: 0644
|
||||
notify: Reload icinga2 service
|
||||
|
||||
- name: Create master zone directory
|
||||
- name: Create needed directories
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/icinga2/zones.d/master
|
||||
state: directory
|
||||
owner: nagios
|
||||
group: nagios
|
||||
mode: 0750
|
||||
|
||||
- name: Copy files under master zone directory
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/icinga2/zones.d/master/{{ item | basename | replace('.j2', '') }}"
|
||||
owner: nagios
|
||||
group: nagios
|
||||
mode: 0644
|
||||
with_fileglob:
|
||||
- "{{ role_path }}/templates/zones.d/master/*.conf.j2"
|
||||
notify: Reload icinga2 service
|
||||
|
||||
- name: Create global-templates zone directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/icinga2/zones.d/global-templates
|
||||
path: "/etc/icinga2/{{ item }}"
|
||||
state: directory
|
||||
owner: nagios
|
||||
group: nagios
|
||||
mode: 0750
|
||||
loop:
|
||||
- zones.d/global-templates
|
||||
- zones.d/master
|
||||
- zones.d/master/services
|
||||
|
||||
- name: Copy files under global-templates zone directory
|
||||
become: true
|
||||
|
@ -76,14 +59,17 @@
|
|||
- "{{ role_path }}/templates/zones.d/global-templates/*.conf.j2"
|
||||
notify: Reload icinga2 service
|
||||
|
||||
- name: Create services directory
|
||||
- name: Copy files under master zone directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/icinga2/zones.d/master/services
|
||||
state: directory
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/icinga2/zones.d/master/{{ item | basename | replace('.j2', '') }}"
|
||||
owner: nagios
|
||||
group: nagios
|
||||
mode: 0750
|
||||
mode: 0644
|
||||
with_fileglob:
|
||||
- "{{ role_path }}/templates/zones.d/master/*.conf.j2"
|
||||
notify: Reload icinga2 service
|
||||
|
||||
- name: Copy common services
|
||||
become: true
|
||||
|
|
Loading…
Add table
Reference in a new issue