summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-01-04 08:09:40 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-01-04 08:09:40 -0500
commitfb1b9ff7d3293c821a8569ae95dcc8a98dfbf967 (patch)
treeb98e2e19e491aacfdf942caa3ca82416808fa49b
parent7cee7585ba41958d9e99fbbb56fa0d748567a770 (diff)
parent3f85ca5e72538110a4962cdb4961fa9e9f122648 (diff)
downloadopenshift-fb1b9ff7d3293c821a8569ae95dcc8a98dfbf967.tar.gz
openshift-fb1b9ff7d3293c821a8569ae95dcc8a98dfbf967.tar.bz2
openshift-fb1b9ff7d3293c821a8569ae95dcc8a98dfbf967.tar.xz
openshift-fb1b9ff7d3293c821a8569ae95dcc8a98dfbf967.zip
Merge pull request #1095 from abutcher/restarts
Fix restart handlers
-rw-r--r--roles/etcd/handlers/main.yml2
-rw-r--r--roles/etcd/tasks/main.yml2
-rw-r--r--roles/openshift_master/handlers/main.yml6
-rw-r--r--roles/openshift_master/tasks/main.yml6
-rw-r--r--roles/openshift_node/handlers/main.yml2
-rw-r--r--roles/openshift_node/tasks/main.yml2
6 files changed, 10 insertions, 10 deletions
diff --git a/roles/etcd/handlers/main.yml b/roles/etcd/handlers/main.yml
index aeb26d6b2..e00e1cac4 100644
--- a/roles/etcd/handlers/main.yml
+++ b/roles/etcd/handlers/main.yml
@@ -2,4 +2,4 @@
- name: restart etcd
service: name={{ etcd_service }} state=restarted
- when: not etcd_service_status_changed | default(false)
+ when: not (etcd_service_status_changed | default(false) | bool)
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index 2160ed817..663f6e537 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -104,4 +104,4 @@
register: start_result
- set_fact:
- etcd_service_status_changed = start_result | changed
+ etcd_service_status_changed = "{{ start_result | changed }}"
diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml
index d9c4ba1d7..e1b95eda4 100644
--- a/roles/openshift_master/handlers/main.yml
+++ b/roles/openshift_master/handlers/main.yml
@@ -1,12 +1,12 @@
---
- name: restart master
service: name={{ openshift.common.service_type }}-master state=restarted
- when: (not openshift_master_ha | bool) and (not master_service_status_changed | default(false))
+ when: (not openshift_master_ha | bool) and (not (master_service_status_changed | default(false) | bool))
- name: restart master api
service: name={{ openshift.common.service_type }}-master-api state=restarted
- when: (openshift_master_ha | bool) and (not master_api_service_status_changed | default(false)) and openshift.master.cluster_method == 'native'
+ when: (openshift_master_ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
- name: restart master controllers
service: name={{ openshift.common.service_type }}-master-controllers state=restarted
- when: (openshift_master_ha | bool) and (not master_controllers_service_status_changed | default(false)) and openshift.master.cluster_method == 'native'
+ when: (openshift_master_ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 46a8cea96..a22654678 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -292,7 +292,7 @@
when: openshift_master_ha | bool
- set_fact:
- master_service_status_changed: start_result | changed
+ master_service_status_changed: "{{ start_result | changed }}"
when: not openshift_master_ha | bool
- name: Start and enable master api
@@ -301,7 +301,7 @@
register: start_result
- set_fact:
- master_api_service_status_changed: start_result | changed
+ master_api_service_status_changed: "{{ start_result | changed }}"
when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
- name: Start and enable master controller
@@ -310,7 +310,7 @@
register: start_result
- set_fact:
- master_controllers_service_status_changed: start_result | changed
+ master_controllers_service_status_changed: "{{ start_result | changed }}"
when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
- name: Install cluster packages
diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml
index 447ca85f3..c288f4d05 100644
--- a/roles/openshift_node/handlers/main.yml
+++ b/roles/openshift_node/handlers/main.yml
@@ -1,7 +1,7 @@
---
- name: restart node
service: name={{ openshift.common.service_type }}-node state=restarted
- when: not node_service_status_changed | default(false)
+ when: not (node_service_status_changed | default(false) | bool)
- name: restart docker
service: name=docker state=restarted
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 96383439c..33852d7f8 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -135,4 +135,4 @@
register: start_result
- set_fact:
- node_service_status_changed: start_result | changed
+ node_service_status_changed: "{{ start_result | changed }}"