Need to flatten the array list FROM
[
[
[
"10.11.33.11"
]
],
[
[
"10.11.88.88"
]
]
]
TO
[ "10.11.33.11", "10.11.88.88" ]
I understand your question as "How to manage list variables?
Since you have list of lists,
---
- hosts: localhost
become: false
gather_facts: false
vars:
LIST: [ [ ['10.11.33.11'] ],[ ['10.11.88.88'] ] ]
tasks:
- name: Show LIST flattened
debug:
msg: "{{ LIST | flatten(levels=2) }}"
you need need to address the level. Resulting into an output of
TASK [Show LIST flattened] *******
ok: [localhost] =>
msg:
- 10.11.33.11
- 10.11.88.88
Background Information
if someone may be interested.