From 238a7488bfb071924e3a412fa7b87d938d598091 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Tue, 18 Aug 2020 11:57:57 -0700 Subject: [PATCH] Replacing selectattr('tls', 'true'|'false') with selectattr('tls', '==', true|false). In the jinja2 doc: true(value) and false(value) are "New in version 2.11." --- roles/rsyslog/tasks/inputs/remote/main.yml | 4 ++-- roles/rsyslog/tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/rsyslog/tasks/inputs/remote/main.yml b/roles/rsyslog/tasks/inputs/remote/main.yml index adffb614..ee148cfb 100644 --- a/roles/rsyslog/tasks/inputs/remote/main.yml +++ b/roles/rsyslog/tasks/inputs/remote/main.yml @@ -18,9 +18,9 @@ __logging_remote_ptcp: "{{ __logging_remote_tcp | selectattr('tls', 'undefined') | list }} + {{ __logging_remote_tls | - selectattr('tls', 'false') | list }}" + selectattr('tls', '==', false) | list }}" __logging_remote_tlstcp: "{{ __logging_remote_tls | - selectattr('tls', 'true') | list }}" + selectattr('tls', '==', true) | list }}" - name: Install/Update remote input packages and generate configuration files in /etc/rsyslog.d vars: diff --git a/roles/rsyslog/tasks/main.yml b/roles/rsyslog/tasks/main.yml index 9e30c5b1..820a875e 100644 --- a/roles/rsyslog/tasks/main.yml +++ b/roles/rsyslog/tasks/main.yml @@ -210,11 +210,11 @@ vars: __logging_forwards_tls: "{{ logging_outputs | selectattr('type', '==', 'forwards') | selectattr('tls', 'defined') | - selectattr('tls', 'true') | list }}" + selectattr('tls', '==', true) | list }}" __logging_remote_tls: "{{ logging_inputs | selectattr('type', '==', 'remote') | selectattr('tcp_ports', 'defined') | selectattr('tls', 'defined') | - selectattr('tls', 'true') | list }}" + selectattr('tls', '==', true) | list }}" when: - __rsyslog_enabled | bool