Hii

I have something like this in my vars:

test:
  - - host1
    - fd99:9999::1
  - - host1
    - 10.0.1.1
  - - host2
    - fd99:9999::1
  - - host2
    - 10.0.1.1
  - - foo
    - fd99:9999::1
  - - foo
    - 10.0.1.1
  - - baz
    - fd99:9999::1
  - - baz
    - 10.0.1.1


Each first and second list item should become keys in a dict, like this:

conv:
  - name: host1
    address: fd99:9999::1
  - name: host1
    address: 10.0.1.1
  - name: host2
    address: fd99:9999::1
  - name: host2
    address: 10.0.1.1
  - name: foo
    address: fd99:9999::1
  - name: foo
    address: 10.0.1.1
  - name: baz
    address: fd99:9999::1
  - name: baz
    address: 10.0.1.1

I tried a few things with mapping and filtering, but can't see how to do
it....
any suggestions? Ideally no tasks, just filters....

thx

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAF8BbLamT%3Ds3H4R%3DcxShSg16KrSr%2B4%3D%3DUytgZbjPivhMK1rfmg%40mail.gmail.com.

Reply via email to