21 lines
569 B
YAML
Raw Normal View History

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