21 lines
549 B
YAML
Raw Normal View History

2022-11-12 20:45:00 +01:00
- name: "Remove all directories"
file:
path: "/var/www/{{ item }}"
state: absent
with_items:
- "{{ project_name }}"
when: "project_name is defined and project is not defined"
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"
- name: "Remove single directory"
file:
path: "/var/www/{{ project }}"
state: absent
when: "project is defined"
vars:
ansible_become: yes
ansible_become_method: sudo
ansible_become_password: "{{ sudo_password }}"