summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
-rw-r--r--roles/openshift_hosted_logging/handlers/main.yml5
-rw-r--r--roles/openshift_hosted_logging/meta/main.yaml1
-rw-r--r--roles/openshift_hosted_logging/tasks/deploy_logging.yaml2
-rw-r--r--roles/openshift_hosted_logging/tasks/update_master_config.yaml7
-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
10 files changed, 35 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index c7282d23d..60c564e5b 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1022,7 +1022,7 @@ def set_nodename(facts):
if 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'openstack':
facts['node']['nodename'] = facts['provider']['metadata']['hostname'].replace('.novalocal', '')
elif 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'gce':
- facts['node']['nodename'] = '.'.split(facts['provider']['metadata']['hostname'])[0]
+ facts['node']['nodename'] = facts['provider']['metadata']['instance']['hostname'].split('.')[0]
else:
facts['node']['nodename'] = facts['common']['hostname'].lower()
return facts
diff --git a/roles/openshift_hosted_logging/handlers/main.yml b/roles/openshift_hosted_logging/handlers/main.yml
new file mode 100644
index 000000000..ad79e62ae
--- /dev/null
+++ b/roles/openshift_hosted_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_hosted_logging/meta/main.yaml b/roles/openshift_hosted_logging/meta/main.yaml
index b695bde87..044c8043c 100644
--- a/roles/openshift_hosted_logging/meta/main.yaml
+++ b/roles/openshift_hosted_logging/meta/main.yaml
@@ -1,3 +1,4 @@
---
dependencies:
- { role: openshift_common }
+ - { role: openshift_master_facts }
diff --git a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
index 513a74c69..afd82766f 100644
--- a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
+++ b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
@@ -165,6 +165,8 @@
retries: 20
delay: 15
+- include: update_master_config.yaml
+
- debug:
msg: "Logging components deployed. Note persistent volume for elasticsearch must be setup manually"
diff --git a/roles/openshift_hosted_logging/tasks/update_master_config.yaml b/roles/openshift_hosted_logging/tasks/update_master_config.yaml
new file mode 100644
index 000000000..1122e059c
--- /dev/null
+++ b/roles/openshift_hosted_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://{{ logging_hostname }}"
+ notify: restart master
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