lists and dictionaries in layers

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!