odoo/setup/odoo-playboook/roles/nginx/tasks/remove-unwanted.yml

35 lines
825 B
YAML

---
- name: Remove unwanted sites
file:
path: "{{nginx_conf_dir}}/{{ item[0] }}/{{ item[1] }}.conf"
state: absent
with_nested:
- ['sites-enabled', 'sites-available']
- "{{ nginx_remove_sites }}"
notify:
- reload nginx
- name: Remove unwanted conf
file:
path: "{{nginx_conf_dir}}/conf.d/{{ item[1] }}.conf"
state: absent
with_items: "{{ nginx_remove_configs }}"
notify:
- reload nginx
- name: Remove unwanted snippets
file:
path: "{{ nginx_conf_dir }}/snippets/{{ item[1] }}.conf"
state: absent
with_items: "{{ nginx_remove_snippets }}"
notify:
- reload nginx
- name: Remove unwanted auth_basic_files
file:
path: "{{nginx_conf_dir}}/auth_basic/{{ item }}"
state: absent
with_items: "{{ nginx_remove_auth_basic_files }}"
notify:
- reload nginx