parent
9dba002f10
commit
0e4df5b590
2 changed files with 8 additions and 0 deletions
roles/nginx/tasks/main
|
@ -5,3 +5,5 @@
|
||||||
or item.name == "redirect"
|
or item.name == "redirect"
|
||||||
or item.name == "logging"
|
or item.name == "logging"
|
||||||
loop: "{{ nginx__configurations }}"
|
loop: "{{ nginx__configurations }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
|
@ -127,12 +127,16 @@
|
||||||
group: root
|
group: root
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ nginx__configurations }}"
|
loop: "{{ nginx__configurations }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Add names with suffixes from `nginx__configurations` to `nginx__config_files_to_exist` fact
|
- name: Add names with suffixes from `nginx__configurations` to `nginx__config_files_to_exist` fact
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
nginx__config_files_to_exist: "{{ nginx__config_files_to_exist + [ item.name + '.conf' ] }}" # noqa: jinja[spacing]
|
nginx__config_files_to_exist: "{{ nginx__config_files_to_exist + [ item.name + '.conf' ] }}" # noqa: jinja[spacing]
|
||||||
loop: "{{ nginx__configurations }}"
|
loop: "{{ nginx__configurations }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: Find configuration files to remove
|
- name: Find configuration files to remove
|
||||||
ansible.builtin.find:
|
ansible.builtin.find:
|
||||||
|
@ -147,4 +151,6 @@
|
||||||
state: absent
|
state: absent
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ nginx__config_files_to_remove.files }}"
|
loop: "{{ nginx__config_files_to_remove.files }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.path | ansible.builtin.basename }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
Loading…
Add table
Reference in a new issue