summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-09-19 15:10:01 -0400
committerGitHub <noreply@github.com>2016-09-19 15:10:01 -0400
commit47a2e769d1cd462d213f1367122e6af8c862650e (patch)
treeac61a692a59e6ef31ea2238075cc5dbd272eb258
parentde7bd345d356589af4e1064fdafbb048d520d69b (diff)
parentad49c7d7b1e37f649b63afc3f61fcbcabc6679ec (diff)
downloadopenshift-47a2e769d1cd462d213f1367122e6af8c862650e.tar.gz
openshift-47a2e769d1cd462d213f1367122e6af8c862650e.tar.bz2
openshift-47a2e769d1cd462d213f1367122e6af8c862650e.tar.xz
openshift-47a2e769d1cd462d213f1367122e6af8c862650e.zip
Merge pull request #2470 from abutcher/issue2460
[uninstall] Stop services on all hosts prior to removing files.
-rw-r--r--playbooks/adhoc/uninstall.yml69
1 files changed, 41 insertions, 28 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index aaff789d7..789f66b14 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -22,6 +22,7 @@
- set_fact:
is_containerized: "{{ is_atomic or containerized | default(false) | bool }}"
+# Stop services on all hosts prior to removing files.
- hosts: nodes
become: yes
tasks:
@@ -35,6 +36,46 @@
- origin-node
failed_when: false
+- hosts: masters
+ become: yes
+ tasks:
+ - name: Stop services
+ service: name={{ item }} state=stopped
+ with_items:
+ - atomic-enterprise-master
+ - atomic-openshift-master
+ - atomic-openshift-master-api
+ - atomic-openshift-master-controllers
+ - openshift-master
+ - openshift-master-api
+ - openshift-master-controllers
+ - origin-master
+ - origin-master-api
+ - origin-master-controllers
+ - pcsd
+ failed_when: false
+
+- hosts: etcd
+ become: yes
+ tasks:
+ - name: Stop services
+ service: name={{ item }} state=stopped
+ with_items:
+ - etcd
+ failed_when: false
+
+- hosts: lb
+ become: yes
+ tasks:
+ - name: Stop services
+ service: name={{ item }} state=stopped
+ with_items:
+ - haproxy
+ failed_when: false
+
+- hosts: nodes
+ become: yes
+ tasks:
- name: unmask services
command: systemctl unmask "{{ item }}"
changed_when: False
@@ -197,22 +238,6 @@
- hosts: masters
become: yes
tasks:
- - name: Stop services
- service: name={{ item }} state=stopped
- with_items:
- - atomic-enterprise-master
- - atomic-openshift-master
- - atomic-openshift-master-api
- - atomic-openshift-master-controllers
- - openshift-master
- - openshift-master-api
- - openshift-master-controllers
- - origin-master
- - origin-master-api
- - origin-master-controllers
- - pcsd
- failed_when: false
-
- name: unmask services
command: systemctl unmask "{{ item }}"
changed_when: False
@@ -307,12 +332,6 @@
- hosts: etcd
become: yes
tasks:
- - name: Stop services
- service: name={{ item }} state=stopped
- with_items:
- - etcd
- failed_when: false
-
- name: unmask services
command: systemctl unmask "{{ item }}"
changed_when: False
@@ -358,12 +377,6 @@
- hosts: lb
become: yes
tasks:
- - name: Stop services
- service: name={{ item }} state=stopped
- with_items:
- - haproxy
- failed_when: false
-
- name: unmask services
command: systemctl unmask "{{ item }}"
changed_when: False