forked from Open-CAS/open-cas-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opencas-teardown.yml
48 lines (41 loc) · 1.02 KB
/
opencas-teardown.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- hosts: opencas_nodes
roles:
- role: opencas-defaults
tasks:
- name: Flush and stop all Open CAS devices (this may take some time)
cas:
stop:
flush: True
when: opencas_installed | bool
become: True
- name: Remove Open CAS devices configuration
cas:
zap: True
when: opencas_installed | bool
become: True
- name: Clone and checkout Open CAS repository
git:
repo: "{{ opencas_repo_url }}"
dest: "{{ opencas_path }}"
version: "{{ opencas_version }}"
force: True
become: True
- name: Uninstall Open CAS
make:
chdir: "{{ opencas_path }}"
target: uninstall
ignore_errors: True
become: True
- name: Check if uninstalled
cas:
gather_facts: True
failed_when: opencas_installed | bool
become: True
- name: Remove Open CAS directory
file:
state: absent
force: True
path: '{{ opencas_path }}'
become: True
...