summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-30 14:44:43 -0500
committerGitHub <noreply@github.com>2017-01-30 14:44:43 -0500
commit3372da1e38a73a3f005e6263e7ccdb5aa858106a (patch)
tree1c3fe32b6b9f000c6312cef130c1b9db9df018e3 /roles/openshift_logging
parentdb3718ef7107aeb010ebfd9d1493e94c8b302556 (diff)
parentd5c8f481b6a1a23f95fa2c7c621cbbf2edf64b7a (diff)
downloadopenshift-3372da1e38a73a3f005e6263e7ccdb5aa858106a.tar.gz
openshift-3372da1e38a73a3f005e6263e7ccdb5aa858106a.tar.bz2
openshift-3372da1e38a73a3f005e6263e7ccdb5aa858106a.tar.xz
openshift-3372da1e38a73a3f005e6263e7ccdb5aa858106a.zip
Merge pull request #3214 from ewolinetz/logging_configure_loggingpublicurl
Updating openshift_logging role to add kibana public url to loggingPu…
Diffstat (limited to 'roles/openshift_logging')
-rw-r--r--roles/openshift_logging/handlers/main.yml5
-rw-r--r--roles/openshift_logging/meta/main.yaml1
-rw-r--r--roles/openshift_logging/tasks/install_logging.yaml2
-rw-r--r--roles/openshift_logging/tasks/main.yaml4
-rw-r--r--roles/openshift_logging/tasks/update_master_config.yaml7
5 files changed, 19 insertions, 0 deletions
diff --git a/roles/openshift_logging/handlers/main.yml b/roles/openshift_logging/handlers/main.yml
new file mode 100644
index 000000000..ad79e62ae
--- /dev/null
+++ b/roles/openshift_logging/handlers/main.yml
@@ -0,0 +1,5 @@
+---
+- name: restart master
+ systemd: name={{ openshift.common.service_type }}-master state=restarted
+ when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
+ notify: Verify API Server
diff --git a/roles/openshift_logging/meta/main.yaml b/roles/openshift_logging/meta/main.yaml
index 9c480f73a..bc45dcdab 100644
--- a/roles/openshift_logging/meta/main.yaml
+++ b/roles/openshift_logging/meta/main.yaml
@@ -14,3 +14,4 @@ galaxy_info:
dependencies:
- role: lib_openshift
- role: openshift_facts
+- role: openshift_master_facts
diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml
index 8a33498cd..00c79ee5e 100644
--- a/roles/openshift_logging/tasks/install_logging.yaml
+++ b/roles/openshift_logging/tasks/install_logging.yaml
@@ -48,6 +48,8 @@
loop_var: file
when: not ansible_check_mode
+- include: update_master_config.yaml
+
- name: Printing out objects to create
debug: msg={{file.content | b64decode }}
with_items: "{{ object_defs.results }}"
diff --git a/roles/openshift_logging/tasks/main.yaml b/roles/openshift_logging/tasks/main.yaml
index 4c718805e..36fb827c3 100644
--- a/roles/openshift_logging/tasks/main.yaml
+++ b/roles/openshift_logging/tasks/main.yaml
@@ -12,6 +12,10 @@
- debug: msg="Created temp dir {{mktemp.stdout}}"
+- name: Ensuring ruamel.yaml package is on target
+ command: yum install -y ruamel.yaml
+ check_mode: no
+
- name: Copy the admin client config(s)
command: >
cp {{ openshift_master_config_dir }}/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
diff --git a/roles/openshift_logging/tasks/update_master_config.yaml b/roles/openshift_logging/tasks/update_master_config.yaml
new file mode 100644
index 000000000..af303c47c
--- /dev/null
+++ b/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