summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-10-30 14:33:18 +0100
committerJan Chaloupka <jchaloup@redhat.com>2017-10-30 19:09:52 +0100
commitf760a66e8df431336c108dcfee8168b97b1f02d5 (patch)
treeac018260048b01357fd2000c0a5284e1076434f8
parent2d0365bfabc225dcb91a0df9f37ecda2bd606602 (diff)
downloadopenshift-f760a66e8df431336c108dcfee8168b97b1f02d5.tar.gz
openshift-f760a66e8df431336c108dcfee8168b97b1f02d5.tar.bz2
openshift-f760a66e8df431336c108dcfee8168b97b1f02d5.tar.xz
openshift-f760a66e8df431336c108dcfee8168b97b1f02d5.zip
remove master.service during the non-ha to ha upgrade
-rw-r--r--roles/openshift_master/tasks/clean_systemd_units.yml9
-rw-r--r--roles/openshift_master/tasks/systemd_units.yml16
2 files changed, 15 insertions, 10 deletions
diff --git a/roles/openshift_master/tasks/clean_systemd_units.yml b/roles/openshift_master/tasks/clean_systemd_units.yml
deleted file mode 100644
index e641f84d4..000000000
--- a/roles/openshift_master/tasks/clean_systemd_units.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-
-- name: Disable master service
- systemd:
- name: "{{ openshift.common.service_type }}-master"
- state: stopped
- enabled: no
- masked: yes
- ignore_errors: true
diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml
index fcc66044b..5751723ab 100644
--- a/roles/openshift_master/tasks/systemd_units.yml
+++ b/roles/openshift_master/tasks/systemd_units.yml
@@ -14,8 +14,22 @@
- include: registry_auth.yml
+- name: Disable the legacy master service if it exists
+ systemd:
+ name: "{{ openshift.common.service_type }}-master"
+ state: stopped
+ enabled: no
+ masked: yes
+ ignore_errors: true
+
- name: Remove the legacy master service if it exists
- include: clean_systemd_units.yml
+ file:
+ path: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master.service"
+ state: absent
+ ignore_errors: true
+ when:
+ - openshift.master.cluster_method == "native"
+ - not openshift.common.is_master_system_container | bool
# This is the image used for both HA and non-HA clusters:
- name: Pre-pull master image