|
@@ -4,37 +4,44 @@
|
|
src: elasticsearch-logging.yml
|
|
src: elasticsearch-logging.yml
|
|
dest: "{{mktemp.stdout}}/elasticsearch-logging.yml"
|
|
dest: "{{mktemp.stdout}}/elasticsearch-logging.yml"
|
|
when: es_logging_contents is undefined
|
|
when: es_logging_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
src: elasticsearch.yml
|
|
src: elasticsearch.yml
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
when: es_config_contents is undefined
|
|
when: es_config_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- lineinfile:
|
|
- lineinfile:
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
regexp: '^openshift\.operations\.allow_cluster_reader(.)*$'
|
|
regexp: '^openshift\.operations\.allow_cluster_reader(.)*$'
|
|
line: "\nopenshift.operations.allow_cluster_reader: {{openshift_logging_es_ops_allow_cluster_reader | lower}}"
|
|
line: "\nopenshift.operations.allow_cluster_reader: {{openshift_logging_es_ops_allow_cluster_reader | lower}}"
|
|
when: es_config_contents is undefined
|
|
when: es_config_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{es_logging_contents}}"
|
|
content: "{{es_logging_contents}}"
|
|
dest: "{{mktemp.stdout}}/elasticsearch-logging.yml"
|
|
dest: "{{mktemp.stdout}}/elasticsearch-logging.yml"
|
|
when: es_logging_contents is defined
|
|
when: es_logging_contents is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{es_config_contents}}"
|
|
content: "{{es_config_contents}}"
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
dest: "{{mktemp.stdout}}/elasticsearch.yml"
|
|
when: es_config_contents is defined
|
|
when: es_config_contents is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- - shell: >
|
|
|
|
|
|
+ - command: >
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-elasticsearch
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-elasticsearch
|
|
--from-file=logging.yml={{mktemp.stdout}}/elasticsearch-logging.yml --from-file=elasticsearch.yml={{mktemp.stdout}}/elasticsearch.yml -o yaml --dry-run
|
|
--from-file=logging.yml={{mktemp.stdout}}/elasticsearch-logging.yml --from-file=elasticsearch.yml={{mktemp.stdout}}/elasticsearch.yml -o yaml --dry-run
|
|
register: es_configmap
|
|
register: es_configmap
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{es_configmap.stdout}}"
|
|
content: "{{es_configmap.stdout}}"
|
|
dest: "{{mktemp.stdout}}/templates/logging-elasticsearch-configmap.yaml"
|
|
dest: "{{mktemp.stdout}}/templates/logging-elasticsearch-configmap.yaml"
|
|
when: es_configmap.stdout is defined
|
|
when: es_configmap.stdout is defined
|
|
|
|
+ changed_when: no
|
|
check_mode: no
|
|
check_mode: no
|
|
|
|
|
|
- block:
|
|
- block:
|
|
@@ -42,21 +49,25 @@
|
|
src: curator.yml
|
|
src: curator.yml
|
|
dest: "{{mktemp.stdout}}/curator.yml"
|
|
dest: "{{mktemp.stdout}}/curator.yml"
|
|
when: curator_config_contents is undefined
|
|
when: curator_config_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{curator_config_contents}}"
|
|
content: "{{curator_config_contents}}"
|
|
dest: "{{mktemp.stdout}}/curator.yml"
|
|
dest: "{{mktemp.stdout}}/curator.yml"
|
|
when: curator_config_contenets is defined
|
|
when: curator_config_contenets is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- - shell: >
|
|
|
|
|
|
+ - command: >
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-curator
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-curator
|
|
--from-file=config.yaml={{mktemp.stdout}}/curator.yml -o yaml --dry-run
|
|
--from-file=config.yaml={{mktemp.stdout}}/curator.yml -o yaml --dry-run
|
|
register: curator_configmap
|
|
register: curator_configmap
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{curator_configmap.stdout}}"
|
|
content: "{{curator_configmap.stdout}}"
|
|
dest: "{{mktemp.stdout}}/templates/logging-curator-configmap.yaml"
|
|
dest: "{{mktemp.stdout}}/templates/logging-curator-configmap.yaml"
|
|
when: curator_configmap.stdout is defined
|
|
when: curator_configmap.stdout is defined
|
|
|
|
+ changed_when: no
|
|
check_mode: no
|
|
check_mode: no
|
|
|
|
|
|
- block:
|
|
- block:
|
|
@@ -64,40 +75,48 @@
|
|
src: fluent.conf
|
|
src: fluent.conf
|
|
dest: "{{mktemp.stdout}}/fluent.conf"
|
|
dest: "{{mktemp.stdout}}/fluent.conf"
|
|
when: fluentd_config_contents is undefined
|
|
when: fluentd_config_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
src: fluentd-throttle-config.yaml
|
|
src: fluentd-throttle-config.yaml
|
|
dest: "{{mktemp.stdout}}/fluentd-throttle-config.yaml"
|
|
dest: "{{mktemp.stdout}}/fluentd-throttle-config.yaml"
|
|
when: fluentd_throttle_contents is undefined
|
|
when: fluentd_throttle_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
src: secure-forward.conf
|
|
src: secure-forward.conf
|
|
dest: "{{mktemp.stdout}}/secure-forward.conf"
|
|
dest: "{{mktemp.stdout}}/secure-forward.conf"
|
|
when: fluentd_securefoward_contents is undefined
|
|
when: fluentd_securefoward_contents is undefined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{fluentd_config_contents}}"
|
|
content: "{{fluentd_config_contents}}"
|
|
dest: "{{mktemp.stdout}}/fluent.conf"
|
|
dest: "{{mktemp.stdout}}/fluent.conf"
|
|
when: fluentd_config_contents is defined
|
|
when: fluentd_config_contents is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{fluentd_throttle_contents}}"
|
|
content: "{{fluentd_throttle_contents}}"
|
|
dest: "{{mktemp.stdout}}/fluentd-throttle-config.yaml"
|
|
dest: "{{mktemp.stdout}}/fluentd-throttle-config.yaml"
|
|
when: fluentd_throttle_contents is defined
|
|
when: fluentd_throttle_contents is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{fluentd_secureforward_contents}}"
|
|
content: "{{fluentd_secureforward_contents}}"
|
|
dest: "{{mktemp.stdout}}/secure-forward.conf"
|
|
dest: "{{mktemp.stdout}}/secure-forward.conf"
|
|
when: fluentd_secureforward_contents is defined
|
|
when: fluentd_secureforward_contents is defined
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- - shell: >
|
|
|
|
|
|
+ - command: >
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-fluentd
|
|
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create configmap logging-fluentd
|
|
--from-file=fluent.conf={{mktemp.stdout}}/fluent.conf --from-file=throttle-config.yaml={{mktemp.stdout}}/fluentd-throttle-config.yaml
|
|
--from-file=fluent.conf={{mktemp.stdout}}/fluent.conf --from-file=throttle-config.yaml={{mktemp.stdout}}/fluentd-throttle-config.yaml
|
|
--from-file=secure-forward.conf={{mktemp.stdout}}/secure-forward.conf -o yaml --dry-run
|
|
--from-file=secure-forward.conf={{mktemp.stdout}}/secure-forward.conf -o yaml --dry-run
|
|
register: fluentd_configmap
|
|
register: fluentd_configmap
|
|
|
|
+ changed_when: no
|
|
|
|
|
|
- copy:
|
|
- copy:
|
|
content: "{{fluentd_configmap.stdout}}"
|
|
content: "{{fluentd_configmap.stdout}}"
|
|
dest: "{{mktemp.stdout}}/templates/logging-fluentd-configmap.yaml"
|
|
dest: "{{mktemp.stdout}}/templates/logging-fluentd-configmap.yaml"
|
|
when: fluentd_configmap.stdout is defined
|
|
when: fluentd_configmap.stdout is defined
|
|
|
|
+ changed_when: no
|
|
check_mode: no
|
|
check_mode: no
|