diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml index 195b7b04..66684d7c 100644 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -15,7 +15,7 @@ - name: Remove un-managed config files file: - path: "{{nginx_conf_path}}/{{item}}.conf" + path: "{{item}}" state: absent with_items: "{{all_nginx_vhost_confs.files | default([]) | map(attribute='path') | list}}" when: (item | basename | splitext | first) not in (nginx_vhosts | map(attribute='name') | list)