-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCEP_Uninstall.yml
42 lines (33 loc) · 1.27 KB
/
CEP_Uninstall.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
#©2016-2017 EdgeVerve Systems Limited (a fully owned Infosys subsidiary),Bangalore, India. All Rights Reserved.
- hosts:
- AllHosts
vars_prompt:
- name: CONFIRM
prompt: "THIS PLAY WIPES OUT CEP COMPONENTS ALONG WITH PERSISTED DATA - Say yes to continue"
private: no
default: "no"
- name: DomainName
prompt: "Set Domain Name to access application/services(DNS should support *.domainname)"
default: "oecloud.dev"
private: no
- name: cepfolder
prompt: "Specify the folder used for cep config files and Docker data"
default: "/datadisk"
private: no
- name: DirectLVMstorage
prompt: "Is lvm setup for docker storage"
default: "no"
private: no
pre_tasks:
- set_fact:
domainname: "{{DomainName}}"
cepfolder: "{{cepfolder}}"
directLVMstorage: "{{DirectLVMstorage}}"
- stat: path={{cepfolder}}
register: p
- debug: msg="Folder Path {{cepfolder}} exists and is a directory"
when: p.stat.isdir is defined and p.stat.isdir
- fail: msg="Folder {{cepfolder}} does not exists"
when: p.stat.isdir is not defined and p.stat.isdir == False
roles:
- { role: uninstall, when: CONFIRM == True or CONFIRM == "yes" }