ansible-core 2.19: 'upper' and 'lower' make lists into strings

As ansible-core 2.19 'upper' and 'lower' filters make lists into strings
and these strings are not interpreted as lists when running the plugins,
it is needed to use 'map(<filter>)' to apply the filter to all entries
of a list.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
Rafael Guterres Jeffman
2025-06-12 17:10:08 -03:00
parent 5ae39ec9de
commit 668830fc94
3 changed files with 22 additions and 22 deletions

View File

@@ -97,7 +97,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | lower }}"
hbacsvc: "{{ hbacsvc_list | map('lower') }}"
register: result
failed_when: result.changed or result.failed
@@ -105,7 +105,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | upper }}"
hbacsvc: "{{ hbacsvc_list | map('upper') }}"
register: result
failed_when: result.changed or result.failed
@@ -153,7 +153,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | lower }}"
hbacsvc: "{{ hbacsvc_list | map('lower') }}"
action: member
register: result
failed_when: result.changed or result.failed
@@ -162,7 +162,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | upper }}"
hbacsvc: "{{ hbacsvc_list | map('upper') }}"
action: member
register: result
failed_when: result.changed or result.failed
@@ -171,7 +171,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | upper }}"
hbacsvc: "{{ hbacsvc_list | map('upper') }}"
action: member
state: absent
check_mode: yes
@@ -182,7 +182,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | upper }}"
hbacsvc: "{{ hbacsvc_list | map('upper') }}"
action: member
state: absent
register: result
@@ -192,7 +192,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | upper }}"
hbacsvc: "{{ hbacsvc_list | map('upper') }}"
action: member
state: absent
check_mode: yes
@@ -213,7 +213,7 @@
ipahbacsvcgroup:
ipaadmin_password: SomeADMINpassword
name: testgroup
hbacsvc: "{{ hbacsvc_list | lower }}"
hbacsvc: "{{ hbacsvc_list | map('lower') }}"
action: member
state: absent
register: result