From a222702ed4316f99eac497ac755c5349804c66d2 Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Mon, 27 Mar 2017 15:10:25 -0400 Subject: bug 1432607. Allow configuration of ES log destination --- roles/openshift_logging/tasks/generate_configmaps.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'roles/openshift_logging/tasks') diff --git a/roles/openshift_logging/tasks/generate_configmaps.yaml b/roles/openshift_logging/tasks/generate_configmaps.yaml index c1721895c..e57e564a4 100644 --- a/roles/openshift_logging/tasks/generate_configmaps.yaml +++ b/roles/openshift_logging/tasks/generate_configmaps.yaml @@ -1,10 +1,20 @@ --- - block: - - copy: - src: elasticsearch-logging.yml + - fail: + msg: "The openshift_logging_es_log_appenders '{{openshift_logging_es_log_appenders}}' has an unrecognized option and only supports the following as a list: {{es_log_appenders | join(', ')}}" + when: + - es_logging_contents is undefined + - "{{ openshift_logging_es_log_appenders | list | difference(es_log_appenders) | length != 0 }}" + changed_when: no + + - template: + src: elasticsearch-logging.yml.j2 dest: "{{mktemp.stdout}}/elasticsearch-logging.yml" + vars: + root_logger: "{{openshift_logging_es_log_appenders | join(', ')}}" when: es_logging_contents is undefined changed_when: no + check_mode: no - local_action: > copy content="{{ config_source | combine(override_config,recursive=True) | to_nice_yaml }}" -- cgit v1.2.3