mirror of https://github.com/ansible/ansible.git
Case-insensitive set theory filters (#74256)
Fixes #74255 * Fix call to 'unique(case_sensitive=False)' triggering error when falling back to Ansible's version which **is** case-sensitive * Test multiple situations of 'unique' filter errors with fallback not handling specific parameters Signed-off-by: Rick Elrod <rick@elrod.me> Co-authored-by: Rick Elrod <rick@elrod.me>pull/74426/head
parent
e6a5245d60
commit
8698855ffd
@ -0,0 +1,6 @@
|
||||
breaking_changes:
|
||||
- intersect, difference, symmetric_difference, union filters - the default behavior
|
||||
is now to be case-sensitive (https://github.com/ansible/ansible/issues/74255)
|
||||
- unique filter - the default behavior is now to fail if Jinja2's filter fails and
|
||||
explicit ``case_sensitive=False`` as the Ansible's fallback is case-sensitive
|
||||
(https://github.com/ansible/ansible/pull/74256)
|
||||
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
export ANSIBLE_ROLES_PATH=../
|
||||
|
||||
ansible-playbook runme.yml "$@"
|
||||
|
||||
source virtualenv.sh
|
||||
|
||||
# Install Jinja < 2.10 since we want to test the fallback to Ansible's custom
|
||||
# unique filter. Jinja < 2.10 does not have do_unique so we will trigger the
|
||||
# fallback.
|
||||
pip install 'jinja2 < 2.10'
|
||||
|
||||
# Run the playbook again in the venv with Jinja < 2.10
|
||||
ansible-playbook runme.yml "$@"
|
||||
@ -0,0 +1,4 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
roles:
|
||||
- { role: filter_mathstuff }
|
||||
Loading…
Reference in New Issue