Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HanXHX committed Feb 8, 2019
1 parent c399bf3 commit 3642df1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/htpasswd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion tasks/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down

0 comments on commit 3642df1

Please sign in to comment.