Moin!
For a recent project I needed to have a data structure with nested
arrays, however I could not get it to work using yaml syntax. When using
the following playbook:
- hosts: all
tasks:
- name: Set some test facts
set_fact:
bla: True
stub: [["mystub.example.net", [["ns1.mystub.example.net",
["192.0.2.4"]]]]]
stub2:
-
- mystub2,example.net
-
- ns1.mystub2.example.net
-
- 192.0.2.5
- name: Debug stub
debug: var=stub
- name: Debug stub2
debug: var=stub2
The debug output looks like this:
TASK [Debug stub]
**********************************************************************************
ok: [127.0.0.1] => {
"stub": [
[
"mystub.example.net",
[
[
"ns1.mystub.example.net",
[
"192.0.2.4"
]
]
]
]
]
}
TASK [Debug stub2]
*********************************************************************************
ok: [127.0.0.1] => {
"stub2": [
[
"mystub2,example.net - - ns1.mystub2.example.net - -
192.0.2.5"
]
]
}
but IMHO these data structures should be identical. I also tried to put
the same yams in a var file with the same result. What am I doing wrong?
Any ideas?
So long
-Ralf
—--
Ralf Weber
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3AA023FF-11B9-4A10-92B1-584A91FC151C%40fl1ger.de.
For more options, visit https://groups.google.com/d/optout.