Some fixes
parent
c399bf35b5
commit
3642df1d5f
|
@ -14,6 +14,6 @@
|
||||||
password: "{{ item.1.password }}"
|
password: "{{ item.1.password }}"
|
||||||
state: "{{ item.1.state | default('present') }}"
|
state: "{{ item.1.state | default('present') }}"
|
||||||
path: "{{ nginx_htpasswd_dir }}/{{ item.0.name }}"
|
path: "{{ nginx_htpasswd_dir }}/{{ item.0.name }}"
|
||||||
loop: "{{ nginx_htpasswd | subelements(users) }}"
|
loop: "{{ nginx_htpasswd | subelements('users') }}"
|
||||||
when: item.0.state is not defined or item.0.state == 'present'
|
when: item.0.state is not defined or item.0.state == 'present'
|
||||||
no_log: not nginx_debug_role
|
no_log: not nginx_debug_role
|
||||||
|
|
|
@ -53,9 +53,11 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ nginx_etc_dir }}/{{ item.1 }}/{{ item.0 | nginx_site_filename }}"
|
path: "{{ nginx_etc_dir }}/{{ item.1 }}/{{ item.0 | nginx_site_filename }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ nginx_sites | product(['sites-available', 'sites-enabled']) }}"
|
loop: "{{ nginx_sites | product(dirs) | list }}"
|
||||||
notify: ['reload nginx', 'restart nginx freebsd']
|
notify: ['reload nginx', 'restart nginx freebsd']
|
||||||
when: item.0.state is defined and item.0.state == 'absent'
|
when: item.0.state is defined and item.0.state == 'absent'
|
||||||
|
vars:
|
||||||
|
dirs: ['sites-available', 'sites-enabled']
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ nginx_etc_dir }}/{{ item.1 }}/{{ item.0 | nginx_site_filename }}"
|
label: "{{ nginx_etc_dir }}/{{ item.1 }}/{{ item.0 | nginx_site_filename }}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue