annotate_ops_projects.yaml 702 B

1234567891011121314151617181920
  1. ---
  2. - command: >
  3. {{ openshift_client_binary }}
  4. --config={{ openshift.common.config_base }}/master/admin.kubeconfig
  5. get namespaces -o jsonpath={.items[*].metadata.name} {{ __default_logging_ops_projects | join(' ') }}
  6. register: __logging_ops_projects
  7. - name: Annotate Operations Projects
  8. oc_edit:
  9. kind: ns
  10. name: "{{ project }}"
  11. separator: '#'
  12. content:
  13. metadata#annotations#openshift.io/logging.ui.hostname: "{{ openshift_logging_kibana_ops_hostname }}"
  14. with_items: "{{ __logging_ops_projects.stdout.split(' ') }}"
  15. loop_control:
  16. loop_var: project
  17. when:
  18. - __logging_ops_projects.stderr | length == 0
  19. - openshift_logging_use_ops | default(false) | bool