Hi,

to calrify the question here comes a shorten code block

---
- hosts: localhost
  gather_facts: no
  vars:
    - simple:
      - right
      - middle
      - top
    - nested:
      - hostname: foo
        path:
          - left
      - hostname: bar
        path:
          - blue
          - green
          - yellow
          - "{{ simple }}"

  tasks:
    - name: content of nested
      debug:
        msg: "{{ nested }}"

This is the current output:
PLAY [localhost] 
***************************************************************

TASK [content of nested] 
*******************************************************
Wednesday 31 August 2016  08:55:13 +0200 (0:00:00.025)       0:00:00.025 
****** 
ok: [localhost] => {
    "msg": [
        {
            "hostname": "foo", 
            "path": [
                "left"
            ]
        }, 
        {
            "hostname": "bar", 
            "path": [
                "blue", 
                "green", 
                "yellow", 
                [
                    "right", 
                    "middle", 
                    "top"
                ]
            ]
        }
    ]
}

PLAY RECAP 
*********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0 


What I'd like to have is (manipulated output)

PLAY [localhost] 
***************************************************************

TASK [content of nested] 
*******************************************************
Wednesday 31 August 2016  08:55:13 +0200 (0:00:00.025)       0:00:00.025 
****** 
ok: [localhost] => {
    "msg": [
        {
            "hostname": "foo", 
            "path": [
                "left"
            ]
        }, 
        {
            "hostname": "bar", 
            "path": [
                "blue",
                "green",
                "yellow",
                "right",
                "middle",
                "top",
            ]
        }
    ]
}

PLAY RECAP 
*********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0 


Ideas?

-- 
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/041cfb91-646f-44da-8509-1b948939e603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to