From 9ed378a12afae4f30550ca91b21392077d094f53 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Fri, 27 Jan 2017 14:39:38 -0600 Subject: Updating openshift_logging role to add kibana public url to loggingPublicURL in master-config --- roles/openshift_logging/tasks/install_logging.yaml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_logging') diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index a9699adb8..f0bc709df 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -44,6 +44,13 @@ 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 + - name: Printing out objects to create debug: msg={{file.content | b64decode }} with_items: "{{ object_defs.results }}" -- cgit v1.2.3 From d9bebc99fe94c2a981e6b96f36d0292d7fa80879 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Fri, 27 Jan 2017 15:34:01 -0600 Subject: Updating to correctly pull handler for openshift_logging. Adding logic to openshift_hosted_logging too --- roles/openshift_logging/handlers/main.yml | 5 +++++ roles/openshift_logging/meta/main.yaml | 1 + 2 files changed, 6 insertions(+) create mode 100644 roles/openshift_logging/handlers/main.yml (limited to 'roles/openshift_logging') 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 -- cgit v1.2.3 From d44fe7d0120e1851399b20809aad9b7c17a6add9 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Fri, 27 Jan 2017 16:54:41 -0600 Subject: ensuring ruamel.yaml is on target for oc_scale --- roles/openshift_logging/tasks/main.yaml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/openshift_logging') 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 -- cgit v1.2.3 From c9afeb9e86ff5389d68e2fe25b9e6baaf56b72c6 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Mon, 30 Jan 2017 10:59:45 -0600 Subject: Breaking out master-config changing and updated playbook to apply change to other masters --- roles/openshift_logging/tasks/install_logging.yaml | 7 +------ roles/openshift_logging/tasks/update_master_config.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 roles/openshift_logging/tasks/update_master_config.yaml (limited to 'roles/openshift_logging') diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index f0bc709df..32007e8f2 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/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 }} 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 -- cgit v1.2.3