Skip to content

Commit

Permalink
Replacing selectattr('tls', 'true'|'false') with selectattr('tls', '=…
Browse files Browse the repository at this point in the history
…=', true|false).

In the jinja2 doc:
true(value) and false(value) are "New in version 2.11."
  • Loading branch information
nhosoi committed Aug 20, 2020
1 parent 1284609 commit 238a748
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/rsyslog/tasks/inputs/remote/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions roles/rsyslog/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 238a748

Please sign in to comment.