On 04.03.2019 17:44, Ralf Weber wrote:
> Moin!
>
> On 4 Mar 2019, at 16:55, Kai Stian Olstad wrote:
>> The correct syntax for nested list is
>>
>> stub2:
>> - - mystub2,
example.net
>> - - -
ns1.mystub2.example.net
>> - - 192.0.2.5
>>
>> or
>>
>> stub2:
>> -
>> - mystub2,
example.net
>> -
>> -
>> -
ns1.mystub2.example.net
>> -
>> - 192.0.2.5
>
> Thanks a lot. That was the trick I was looking for. You missed one array ( the structure is complex ;-).
I don't think I missed an array, but I didn't test it so I did now.
- hosts: localhost
gather_facts: false
vars:
tasks:
- debug: var=stub
- debug: var=stub2
Gives:
TASK [debug] ***********************************
ok: [localhost] => {
TASK [debug] ***********************************
ok: [localhost] => {
"stub2": [
[
"mystub2,
example.net",
[
[
"
ns1.mystub2.example.net",
[
"192.0.2.5"
]
]
]
]
]
}
As you can see thees two are identical.
But this gives me
TASK [debug] **************************************
ok: [localhost] => {
"stub3": [
[
"mystub2,
example.net",
[
[
[
"
ns1.mystub2.example.net"
],
[
"192.0.2.5"
]
]
]
]
]
}
And this is *not* the same as your example in your first mail.
--
Kai Stian Olstad