Ansible Lists & Dicts Overview

Reference: Ansible

All members of a list are lines beginning at the same indentation level starting with a  (a dash and a space):

A dictionary is represented in a simple key: value  form (the colon must be followed by a space):

More complicated data structures are possible, such as lists of dictionaries, dictionaries whose values are lists or a mix of both:

Dictionaries and lists can also be represented in an abbreviated form if you really want to:

Additional Example


The below example can was taken from the selectattr( )  page:

Knowledge Base

See the Ansible section of my Knowledge Base for more information.

As always, if you have any questions or have a topic that you would like me to discuss, please feel free to post a comment at the bottom of this blog entry, e-mail at, or drop me a message on Twitter (@OzNetNerd).

Note: This website is my personal blog. The opinions expressed in this blog are my own and not those of my employer.