summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/uninstall.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/adhoc/uninstall.yml')
-rw-r--r--playbooks/adhoc/uninstall.yml37
1 files changed, 36 insertions, 1 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 40db668da..e05ab43f8 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -1,6 +1,6 @@
# This deletes *ALL* Origin, Atomic Enterprise Platform and OpenShift
# Enterprise content installed by ansible. This includes:
-#
+#
# configuration
# containers
# example templates and imagestreams
@@ -13,6 +13,20 @@
sudo: yes
tasks:
+ - name: Detecting Operating System
+ shell: ls /run/ostree-booted
+ ignore_errors: yes
+ failed_when: false
+ register: ostree_output
+
+ - set_fact:
+ is_atomic: "{{ ostree_output.rc == 0 }}"
+
+ - name: Remove br0 interface
+ shell: ovs-vsctl del-br br0
+ changed_when: False
+ failed_when: False
+
- service: name={{ item }} state=stopped
with_items:
- atomic-enterprise-master
@@ -31,8 +45,10 @@
- origin-master-api
- origin-master-controllers
- origin-node
+ - pcsd
- yum: name={{ item }} state=absent
+ when: not is_atomic | bool
with_items:
- atomic-enterprise
- atomic-enterprise-master
@@ -44,6 +60,7 @@
- atomic-openshift-node
- atomic-openshift-sdn-ovs
- etcd
+ - corosync
- openshift
- openshift-master
- openshift-node
@@ -54,11 +71,22 @@
- origin-master
- origin-node
- origin-sdn-ovs
+ - pacemaker
+ - pcs
- tuned-profiles-atomic-enterprise-node
- tuned-profiles-atomic-openshift-node
- tuned-profiles-openshift-node
- tuned-profiles-origin-node
+ - name: Remove linux interfaces
+ shell: ip link del "{{ item }}"
+ changed_when: False
+ failed_when: False
+ with_items:
+ - lbr0
+ - vlinuxbr
+ - vovsbr
+
- shell: systemctl reset-failed
changed_when: False
@@ -112,8 +140,10 @@
- file: path={{ item }} state=absent
with_items:
+ - "~{{ ansible_ssh_user }}/.kube"
- /etc/ansible/facts.d/openshift.fact
- /etc/atomic-enterprise
+ - /etc/corosync
- /etc/etcd
- /etc/openshift
- /etc/openshift-sdn
@@ -127,8 +157,13 @@
- /etc/sysconfig/origin-master
- /etc/sysconfig/origin-node
- /root/.kube
+ - /run/openshift-sdn
- /usr/share/openshift/examples
- /var/lib/atomic-enterprise
- /var/lib/etcd
- /var/lib/openshift
- /var/lib/origin
+ - /var/lib/pacemaker
+
+ - name: restart docker
+ service: name=docker state=restarted