Browse Source

Breaking out master-config changing and updated playbook to apply change to other masters

ewolinetz 8 years ago
parent
commit
c9afeb9e86

+ 7 - 0
playbooks/common/openshift-cluster/openshift_logging.yml

@@ -3,3 +3,10 @@
   hosts: oo_first_master
   roles:
   - openshift_logging
+
+- name: Update Master configs
+  hosts: masters:!oo_first_master
+  tasks:
+    - include_role:
+        name: openshift_logging
+        tasks_from: update_master_config

+ 1 - 6
roles/openshift_logging/tasks/install_logging.yaml

@@ -44,12 +44,7 @@
     loop_var: file
   when: not ansible_check_mode
 
-- name: Adding Kibana route information to loggingPublicURL
-  modify_yaml:
-    dest: "{{ openshift.common.config_base }}/master/master-config.yaml"
-    yaml_key: assetConfig.loggingPublicURL
-    yaml_value: "https://{{ openshift_logging_kibana_hostname }}"
-  notify: restart master
+- include: update_master_config.yaml
 
 - name: Printing out objects to create
   debug: msg={{file.content | b64decode }}

+ 7 - 0
roles/openshift_logging/tasks/update_master_config.yaml

@@ -0,0 +1,7 @@
+---
+- name: Adding Kibana route information to loggingPublicURL
+  modify_yaml:
+    dest: "{{ openshift.common.config_base }}/master/master-config.yaml"
+    yaml_key: assetConfig.loggingPublicURL
+    yaml_value: "https://{{ openshift_logging_kibana_hostname }}"
+  notify: restart master