Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFlatten field yields unexpected results when it hits None #69012
Comments
|
It looks like the issue is with this part of the code: ansible/lib/ansible/plugins/filter/core.py Lines 468 to 470 in 835ad75 That |
borisovano
added a commit
to borisovano/ansible
that referenced
this issue
Apr 17, 2020
fix issue ansible#69012
|
resolved_by_pr #69013 |
|
@borisovano, Could you please check PR #69013 and let us know if it works for you ? |
bcoca
added a commit
to bcoca/ansible
that referenced
this issue
Jun 18, 2020
fix issue ansible#69012 (cherry picked from commit 2127be5)
bcoca
added a commit
to bcoca/ansible
that referenced
this issue
Jun 18, 2020
fixes ansible#69012 fixes ansible#69013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
Flatten field yields unexpected results when it hits None. Instead of skipping over none it silently discards the to-be-flatten list. See example below.
ISSUE TYPE
COMPONENT NAME
flatten filter
ANSIBLE VERSION
OS / ENVIRONMENT
FROM pad92/ansible-alpine:latestSTEPS TO REPRODUCE
EXPECTED RESULTS
ok: [localhost] => {
"msg": "Flatten list: ['a', 'b', 'c', 'd']"
}
TASK [WTF is 'b'] ************************************************************************************************************
ok: [localhost] => {
"msg": "Flatten list: ['a', 'b', 'c', 'd']' <--------- 'b' is present
}
ACTUAL RESULTS
ok: [localhost] => {
"msg": "Flatten list: ['a', 'b', 'c', 'd']"
}
TASK [where is 'b'] ************************************************************************************************************
ok: [localhost] => {
"msg": "Flatten list: ['a', 'c', 'd']" <--------- 'b' is missing
}