From 7558c4e35e076704624fdffa347a08cf7f3a804f Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Tue, 27 Oct 2015 13:42:11 -0400 Subject: Adding uninstall support for Atomic Host --- playbooks/adhoc/uninstall.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml index 40db668da..8cc5b9406 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,14 @@ sudo: yes tasks: + - name: Detecting Operating System + shell: ls /run/ostree-booted + ignore_errors: yes + register: ostree_output + + - set_fact: + is_atomic: ostree_output.rc == 0 + - service: name={{ item }} state=stopped with_items: - atomic-enterprise-master @@ -33,6 +41,7 @@ - origin-node - yum: name={{ item }} state=absent + when: not is_atomic with_items: - atomic-enterprise - atomic-enterprise-master -- cgit v1.2.3 From d753108350bfa8c41ba7c57bcb870a4e303c5659 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Wed, 28 Oct 2015 10:22:18 -0400 Subject: The uninstall playbook should remove the kubeconfig for non-root installs --- playbooks/adhoc/uninstall.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml index 8cc5b9406..af2108690 100644 --- a/playbooks/adhoc/uninstall.yml +++ b/playbooks/adhoc/uninstall.yml @@ -136,6 +136,7 @@ - /etc/sysconfig/origin-master - /etc/sysconfig/origin-node - /root/.kube + - "~{{ ansible_ssh_user }}/.kube" - /usr/share/openshift/examples - /var/lib/atomic-enterprise - /var/lib/etcd -- cgit v1.2.3