diff --git a/doc/site.md b/doc/site.md index c9183ac..fd34236 100644 --- a/doc/site.md +++ b/doc/site.md @@ -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 diff --git a/tasks/site.yml b/tasks/site.yml index 2f1dea6..915e2ef 100644 --- a/tasks/site.yml +++ b/tasks/site.yml @@ -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 }}"