From f760a66e8df431336c108dcfee8168b97b1f02d5 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Mon, 30 Oct 2017 14:33:18 +0100 Subject: remove master.service during the non-ha to ha upgrade --- roles/openshift_master/tasks/clean_systemd_units.yml | 9 --------- roles/openshift_master/tasks/systemd_units.yml | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 roles/openshift_master/tasks/clean_systemd_units.yml (limited to 'roles') 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 -- cgit v1.2.3