What do double curly braces ({{) mean in YAML files (as used by Ansible)?

I found this YAML syntax overview in Ansible documantation, to be fairly useful.

It says that double curly braces {{ variable }} are used to evaluate expressions. Whilst distinguishing a single curly braces (after a colon), that is used to declare a dictionary. For example:

satchmo: {name: Louis Armstrong, music: Jazz, instrument: Trumpet}

Also, take a look at Jinja Template Designer Documentation. Jinja template is rendered before YAML, which means it is evaluated prior to Ansible execution.

{% ... %} for Statements
{{ ... }} for Expressions to print to the template output
{# ... #} for Comments not included in the template output
#  ... ## for Line Statements

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)