|
@@ -2,8 +2,11 @@
|
|
|
- command: >
|
|
|
{{ openshift_client_binary }}
|
|
|
--config={{ openshift.common.config_base }}/master/admin.kubeconfig
|
|
|
- get namespaces -o jsonpath={.items[*].metadata.name} {{ __default_logging_ops_projects | join(' ') }}
|
|
|
- register: __logging_ops_projects
|
|
|
+ get namespaces -o jsonpath={.items[*].metadata.name}
|
|
|
+ register: __all_namespace_names
|
|
|
+
|
|
|
+- set_fact:
|
|
|
+ __logging_ops_projects: "{{ __all_namespace_names.stdout.split(' ') | intersect(__default_logging_ops_projects) }}"
|
|
|
|
|
|
- name: Annotate Operations Projects for hostname
|
|
|
oc_edit:
|
|
@@ -12,11 +15,10 @@
|
|
|
separator: '#'
|
|
|
content:
|
|
|
metadata#annotations#openshift.io/logging.ui.hostname: "{{ openshift_logging_kibana_ops_hostname }}"
|
|
|
- with_items: "{{ __logging_ops_projects.stdout.split(' ') }}"
|
|
|
+ with_items: "{{ __logging_ops_projects }}"
|
|
|
loop_control:
|
|
|
loop_var: project
|
|
|
when:
|
|
|
- - __logging_ops_projects.stderr | length == 0
|
|
|
- openshift_logging_use_ops | default(false) | bool
|
|
|
|
|
|
- name: Annotate Operations Projects for data prefix
|
|
@@ -26,8 +28,6 @@
|
|
|
separator: '#'
|
|
|
content:
|
|
|
metadata#annotations#openshift.io/logging.data.prefix: ".operations"
|
|
|
- with_items: "{{ __logging_ops_projects.stdout.split(' ') }}"
|
|
|
+ with_items: "{{ __logging_ops_projects }}"
|
|
|
loop_control:
|
|
|
loop_var: project
|
|
|
- when:
|
|
|
- - __logging_ops_projects.stderr | length == 0
|