Skip to content

Commit

Permalink
Add explicit generator object to list transform in jinja filter
Browse files Browse the repository at this point in the history
This is required only for ansible <2.10.
Implicit transformation is done in ansible 2.10+ by ansible/ansible#68014
  • Loading branch information
v-zhuravlev committed May 31, 2021
1 parent 27e7293 commit e0d7fbf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions roles/logger/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,44 @@
- include_tasks: dotnet_logger_win.yaml
when: >
(ansible_os_family == 'Windows') and
(agents_to_set_loggers_for | select('match', 'dotnet' ) or
(agents_to_set_loggers_for | select('match', 'dotnet' | list ) or
( agent_type is defined and agent_type == "dotnet" ))
# --------------[ DB ]------------------
- include_tasks: db_logger_linux.yaml
when: >
(ansible_os_family == 'RedHat' or ansible_os_family == 'Debian') and
(agents_to_set_loggers_for | select('match', 'db' ) or
(agents_to_set_loggers_for | select('match', 'db' | list ) or
( agent_type is defined and agent_type == "db" ))
- include_tasks: db_logger_win.yaml
when: >
(ansible_os_family == 'Windows') and
(agents_to_set_loggers_for | select('match', 'db' ) or
(agents_to_set_loggers_for | select('match', 'db' | list ) or
( agent_type is defined and agent_type == "db" ))
# -------------[ Java ]-----------------
- include_tasks: java_logger_linux.yaml
when: >
(ansible_os_family == 'RedHat' or ansible_os_family == 'Debian') and
(agents_to_set_loggers_for | select('match', '.*java.*' ) or
(agents_to_set_loggers_for | select('match', '.*java.*' | list ) or
( agent_type is defined and agent_type is regex('.*java.*')))
- include_tasks: java_logger_win.yaml
when: >
(ansible_os_family == 'Windows') and
(agents_to_set_loggers_for | select('match', '.*java.*' ) or
(agents_to_set_loggers_for | select('match', '.*java.*' | list ) or
( agent_type is defined and agent_type is regex('.*java.*')))
# -----------[ Machine ]----------------
- include_tasks: machine_logger_linux.yaml
when: >
(ansible_os_family == 'RedHat' or ansible_os_family == 'Debian') and
( agents_to_set_loggers_for | select('match', 'machine' ) or
( agents_to_set_loggers_for | select('match', 'machine' | list ) or
( agent_type is defined and agent_type == "machine" ))
- include_tasks: machine_logger_win.yaml
when: >
(ansible_os_family == 'Windows') and
( agents_to_set_loggers_for | select('match', 'machine' ) or
( agents_to_set_loggers_for | select('match', 'machine' | list ) or
( agent_type is defined and agent_type == "machine" ))

0 comments on commit e0d7fbf

Please sign in to comment.