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