---
- hosts: masters[0]
  roles:
  - role: openshift_logging
    openshift_hosted_logging_cleanup: no

- name: Update master-config for publicLoggingURL
  hosts: masters:!masters[0]
  pre_tasks:
  - set_fact:
      openshift_logging_kibana_hostname: "{{ openshift_hosted_logging_hostname | default('kibana.' ~ (openshift_master_default_subdomain | default('router.default.svc.cluster.local', true))) }}"
  tasks:
  - include_role:
      name: openshift_logging
      tasks_from: update_master_config
    when: openshift_hosted_logging_deploy | default(false) | bool
