-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathclean.yml
More file actions
31 lines (25 loc) · 1023 Bytes
/
clean.yml
File metadata and controls
31 lines (25 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- name: unstack an existing devstack with --all
sudo: true
sudo_user: "{{ devstack_user }}"
command: ./unstack.sh --all chdir={{ devstack_working_dir }}
when: unstack_script.stat.exists == true and devstack_clean == false
- stat: path={{ devstack_working_dir }}/clean.sh
register: clean_script
- name: clean an existing devstack
sudo: true
sudo_user: "{{ devstack_user }}"
command: ./clean.sh chdir={{ devstack_working_dir }}
when: clean_script.stat.exists == true
- stat: path={{ devstack_working_dir }}
register: working_path
- name: remove an existing working directory
sudo: true
file: path={{ devstack_working_dir }} state=absent force=yes
when: working_path.stat.isdir is defined and working_path.stat.isdir == true
- stat: path={{ devstack_install_dir }}
register: install_path
- name: remove an existing install directory
sudo: true
file: path={{ devstack_working_dir }} state=absent force=yes
when: install_path.stat.isdir is defined and install_path.stat.isdir == true