lists and dictionaries in layers

8 views
Skip to first unread message

swen.b

unread,
May 18, 2016, 3:27:58 AM5/18/16
to Ansible Project
Is it possbile to use lists and dictionaries in more layers like:

vars:
  users:
    - unsername: jon
      ssh: True
      pages:
        - pagename: page1
          documentroot: /home/page1
        - pagename: page2
          documentroot: /home/page2
    - unsername: jane
      ssh: False
      pages:
        - pagename: page3
          documentroot: /home/page3
        - pagename: page4
          documentroot: /home/page4

Can I use jinja2 templateing to create a file per user with all documentroots in it?
Is this the "right" way to achieve this goal?

Thank you very much for help!
Reply all
Reply to author
Forward
0 new messages