summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-07-02 11:59:22 -0400
committerAvesh Agarwal <avagarwa@redhat.com>2015-08-17 11:03:00 -0400
commit69f6fd410500a3dd20a97a9e3dad860761b09ac8 (patch)
tree168aa5c745331a876ad00371771640cd375f0509
parentf96e82f627b63bf0449eecdd21f85a29ad4210e8 (diff)
downloadopenshift-69f6fd410500a3dd20a97a9e3dad860761b09ac8.tar.gz
openshift-69f6fd410500a3dd20a97a9e3dad860761b09ac8.tar.bz2
openshift-69f6fd410500a3dd20a97a9e3dad860761b09ac8.tar.xz
openshift-69f6fd410500a3dd20a97a9e3dad860761b09ac8.zip
playbooks/adhoc: Add a tutorial-reset playbook to undo everything
This makes it easier to run through the tutorial, as well as reset a VM or baremetal node to a clean slate for developer testing.
-rw-r--r--playbooks/adhoc/tutorial-reset.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/playbooks/adhoc/tutorial-reset.yml b/playbooks/adhoc/tutorial-reset.yml
new file mode 100644
index 000000000..1ceb72d19
--- /dev/null
+++ b/playbooks/adhoc/tutorial-reset.yml
@@ -0,0 +1,46 @@
+# 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:
+ - docker
+ - atomic-enterprise-master
+ - atomic-enterprise-node
+
+ - yum: name={{ item }} state=absent
+ with_items:
+ - openvswitch
+ - atomic-enterprise
+ - atomic-enterprise-master
+ - atomic-enterprise-node
+ - atomic-enterprise-sdn-ovs
+ - tuned-profiles-atomic-enterprise-node
+
+ - shell: systemctl reset-failed
+ changed_when: False
+
+ - shell: systemctl daemon-reload
+ changed_when: False
+
+ - shell: find /var/lib/atomic-enterprise/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
+ changed_when: False
+
+ - file: path={{ item }} state=absent
+ with_items:
+ - /var/lib/atomic-enterprise
+ - /etc/sysconfig/atomic-enterprise
+ - /etc/atomic-enterprise
+ - /etc/openshift
+ - /var/lib/docker
+
+ - user: name={{ item }} state=absent remove=yes
+ with_items:
+ - alice
+ - joe