summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-08-17 12:08:15 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2015-08-17 12:08:15 -0400
commit8382fa264d769021b9f37bc50f99ec5f69dbc751 (patch)
treee8bdf46e4a0a81c2ff46dfd1e93bb419db5bc37c
parent4cbc4eeba205ad923aa58facc8c82344f0be0938 (diff)
parent0e94fa986dd928888c36d2fbef71359c0b9b05d2 (diff)
downloadopenshift-8382fa264d769021b9f37bc50f99ec5f69dbc751.tar.gz
openshift-8382fa264d769021b9f37bc50f99ec5f69dbc751.tar.bz2
openshift-8382fa264d769021b9f37bc50f99ec5f69dbc751.tar.xz
openshift-8382fa264d769021b9f37bc50f99ec5f69dbc751.zip
Merge pull request #444 from aveshagarwal/ae-ansible-merge-uninstall
AE->OSO ansible uninstall merge
-rw-r--r--playbooks/adhoc/atomic_openshift_tutorial_reset.yml93
1 files changed, 93 insertions, 0 deletions
diff --git a/playbooks/adhoc/atomic_openshift_tutorial_reset.yml b/playbooks/adhoc/atomic_openshift_tutorial_reset.yml
new file mode 100644
index 000000000..1200caa2a
--- /dev/null
+++ b/playbooks/adhoc/atomic_openshift_tutorial_reset.yml
@@ -0,0 +1,93 @@
+# This deletes *ALL* Docker images, and uninstalls OpenShift and
+# Atomic Enterprise RPMs. It is primarily intended for use
+# with the tutorial as well as for developers to reset state.
+
+- hosts:
+ - OSEv3:children
+
+ sudo: yes
+
+ tasks:
+ - service: name={{ item }} state=stopped
+ with_items:
+ - openvswitch
+ - origin-master
+ - origin-node
+ - atomic-openshift-master
+ - atomic-openshift-node
+ - openshift-master
+ - openshift-node
+ - atomic-enterprise-master
+ - atomic-enterprise-node
+
+ - yum: name={{ item }} state=absent
+ with_items:
+ - openvswitch
+ - origin
+ - origin-master
+ - origin-node
+ - origin-sdn-ovs
+ - tuned-profiles-origin-node
+ - atomic-openshift
+ - atomic-openshift-master
+ - atomic-openshift-node
+ - atomic-openshift-sdn-ovs
+ - tuned-profiles-atomic-openshift-node
+ - atomic-enterprise
+ - atomic-enterprise-master
+ - atomic-enterprise-node
+ - atomic-enterprise-sdn-ovs
+ - tuned-profiles-atomic-enterprise-node
+ - openshift
+ - openshift-master
+ - openshift-node
+ - openshift-sdn-ovs
+ - tuned-profiles-openshift-node
+
+ - shell: systemctl reset-failed
+ changed_when: False
+
+ - shell: systemctl daemon-reload
+ changed_when: False
+
+ - shell: find /var/lib/origin/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
+ changed_when: False
+
+ - shell: find /var/lib/atomic-enterprise/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
+ changed_when: False
+
+ - shell: find /var/lib/openshift/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
+ changed_when: False
+
+ - shell: docker ps -a -q | xargs docker stop
+ changed_when: False
+
+ - shell: docker ps -a -q| xargs docker rm
+ changed_when: False
+
+ - shell: docker images -q |xargs docker rmi
+ changed_when: False
+
+ - file: path={{ item }} state=absent
+ with_items:
+ - /etc/openshift-sdn
+ - /root/.kube
+ - /etc/origin
+ - /etc/atomic-enterprise
+ - /etc/openshift
+ - /var/lib/origin
+ - /var/lib/openshift
+ - /var/lib/atomic-enterprise
+ - /etc/sysconfig/origin-master
+ - /etc/sysconfig/origin-node
+ - /etc/sysconfig/atomic-openshift-master
+ - /etc/sysconfig/atomic-openshift-node
+ - /etc/sysconfig/openshift-master
+ - /etc/sysconfig/openshift-node
+ - /etc/sysconfig/atomic-enterprise-master
+ - /etc/sysconfig/atomic-enterprise-node
+
+ - user: name={{ item }} state=absent remove=yes
+ with_items:
+ - alice
+ - joe