summaryrefslogtreecommitdiffstats
path: root/roles/openshift_web_console
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-18 20:32:30 -0800
committerGitHub <noreply@github.com>2018-01-18 20:32:30 -0800
commit9959a35897132cc9f9ee8a95e7436095b1fc4493 (patch)
tree00e5646c7d4b55c0a9fbcd39e58e658a737a6929 /roles/openshift_web_console
parent5f8cd00df722f635b8fabde4cd4ff40740f1b5d5 (diff)
parentf220b2a490851351d9c1db15945f2687b62df795 (diff)
downloadopenshift-9959a35897132cc9f9ee8a95e7436095b1fc4493.tar.gz
openshift-9959a35897132cc9f9ee8a95e7436095b1fc4493.tar.bz2
openshift-9959a35897132cc9f9ee8a95e7436095b1fc4493.tar.xz
openshift-9959a35897132cc9f9ee8a95e7436095b1fc4493.zip
Merge pull request #6785 from spadgett/tsb-redeploy-console
Automatic merge from submit-queue. Rollout console after template service broker install The console will discover if the broker is running, but only on startup. Trigger a rollout so that the console sees the change. /assign @sdodson cc @jwforres @deads2k @bparees
Diffstat (limited to 'roles/openshift_web_console')
-rw-r--r--roles/openshift_web_console/tasks/rollout_console.yml20
-rw-r--r--roles/openshift_web_console/tasks/update_console_config.yml12
2 files changed, 21 insertions, 11 deletions
diff --git a/roles/openshift_web_console/tasks/rollout_console.yml b/roles/openshift_web_console/tasks/rollout_console.yml
new file mode 100644
index 000000000..75682ba1d
--- /dev/null
+++ b/roles/openshift_web_console/tasks/rollout_console.yml
@@ -0,0 +1,20 @@
+---
+- name: Check if console deployment exists
+ oc_obj:
+ kind: deployments
+ name: webconsole
+ namespace: openshift-web-console
+ state: list
+ register: console_deployment
+
+# There's currently no command to trigger a rollout for a k8s deployment
+# without changing the pod spec. Add an annotation to force a rollout.
+- name: Rollout updated web console deployment
+ oc_edit:
+ kind: deployments
+ name: webconsole
+ namespace: openshift-web-console
+ separator: '#'
+ content:
+ spec#template#metadata#annotations#installer-triggered-rollout: "{{ ansible_date_time.iso8601_micro }}"
+ when: console_deployment.results.results.0 | length > 0
diff --git a/roles/openshift_web_console/tasks/update_console_config.yml b/roles/openshift_web_console/tasks/update_console_config.yml
index e347c0193..4d2957977 100644
--- a/roles/openshift_web_console/tasks/update_console_config.yml
+++ b/roles/openshift_web_console/tasks/update_console_config.yml
@@ -58,14 +58,4 @@
changed_when: False
# TODO: Only rollout if config has changed.
-# There's currently no command to trigger a rollout for a k8s deployment
-# without changing the pod spec. Add an annotation to force a rollout after
-# the config map has been edited.
-- name: Rollout updated web console deployment
- oc_edit:
- kind: deployments
- name: webconsole
- namespace: openshift-web-console
- separator: '#'
- content:
- spec#template#metadata#annotations#installer-triggered-rollout: "{{ ansible_date_time.iso8601_micro }}"
+- include_tasks: rollout_console.yml