summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-11-10 13:39:04 -0400
committerDevan Goodwin <dgoodwin@redhat.com>2015-11-10 15:08:46 -0400
commit28d601beeebaacd5e79b3fec336a283c8bf20e68 (patch)
tree449c2e74384373dfc4695fa0e68e224202e64f1b /playbooks/adhoc
parentd9e8e0ea821a87c3eb924dc89f5cd8de40ce34c8 (diff)
downloadopenshift-28d601beeebaacd5e79b3fec336a283c8bf20e68.tar.gz
openshift-28d601beeebaacd5e79b3fec336a283c8bf20e68.tar.bz2
openshift-28d601beeebaacd5e79b3fec336a283c8bf20e68.tar.xz
openshift-28d601beeebaacd5e79b3fec336a283c8bf20e68.zip
Add separate step to enable services during upgrade.
Instead of combining this with tasks to restart services, add a separate started+enabled play for masters and nodes at the end of the playbook.
Diffstat (limited to 'playbooks/adhoc')
-rw-r--r--playbooks/adhoc/upgrades/upgrade.yml22
1 files changed, 19 insertions, 3 deletions
diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
index 30f911f6f..324f5fba3 100644
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ b/playbooks/adhoc/upgrades/upgrade.yml
@@ -226,7 +226,7 @@
when: inventory_hostname != groups.masters.0
- name: Restart master services
- service: name="{{ openshift.common.service_type}}-master" enabled=yes state=restarted
+ service: name="{{ openshift.common.service_type}}-master" state=restarted
when: not openshift_master_ha | bool
- name: Destroy cluster
@@ -281,7 +281,7 @@
- name: Upgrade node packages
command: yum update -y {{ openshift.common.service_type }}-node{{ openshift_version }}
- name: Restart node services
- service: name="{{ openshift.common.service_type }}-node" enabled=yes state=restarted
+ service: name="{{ openshift.common.service_type }}-node" state=restarted
- name: Update cluster policy and policy bindings
hosts: masters[0]
@@ -311,7 +311,7 @@
openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
tasks:
- name: Restart master services
- service: name="{{ openshift.common.service_type}}-master" enabled=yes state=restarted
+ service: name="{{ openshift.common.service_type}}-master" state=restarted
when: not openshift_master_ha | bool
- name: Restart cluster post reconcile
@@ -389,3 +389,19 @@
openshift_deployment_type: "{{ deployment_type }}"
roles:
- openshift_examples
+
+- name: Ensure master services enabled
+ hosts: masters
+ vars:
+ openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
+ tasks:
+ - name: Enable master services
+ service: name="{{ openshift.common.service_type}}-master" state=started enabled=yes
+ when: not openshift_master_ha | bool
+
+- name: Ensure node services enabled
+ hosts: nodes
+ tasks:
+ - name: Restart node services
+ service: name="{{ openshift.common.service_type }}-node" state=started enabled=yes
+