Fix site.state == absent

- Site is deleted now
- Doc updated
pull/35/head
Emilien Mantel 2017-12-06 12:05:46 +01:00
parent d00f3301e1
commit 222998839c
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ Common
------
- `name`: (M) Domain or list of domain used.
- `template`: (D) template used to create site. Optional if you set `delete` to true or using `redirect_tor`.
- `template`: (D) template used to create site. Optional if you set `state`=`absent` or using `redirect_to`.
- `filename`: (O) Specify filename in /etc/nginx/sites-*. Do NOT specify default (reserved keyword). It will be used for log filenames and directories creation.
- `state`: (O) Site status. Can be "present" (default), "absent" and "disabled".
- `redirect_from`: (O) Domain list to redirect to the first `name`. You can use this key to redirect non-www to www

View File

@ -57,7 +57,7 @@
- "{{ nginx_sites }}"
- ['sites-available', 'sites-enabled']
notify: ['reload nginx', 'restart nginx freebsd']
when: item.state is defined and item.state == 'absent'
when: item.0.state is defined and item.0.state == 'absent'
loop_control:
label: "{{ nginx_etc_dir }}/{{ item.1 }}/{{ item.0 | nginx_site_filename }}"