Referencing simple variables
After you define a variable, use Jinja2 syntax to reference it. Jinja2 variables use double curly braces. For example, the expressionMyampgoesto{{max_amp_value}}demonstrates the most basic form of variable substitution. You can use Jinja2 syntax in playbooks. The following example shows a variable that defines the location of a file, which can vary from one system to another:
Ansible allows Jinja2 loops and conditionals intemplatesbut not in playbooks. You cannot create a loop of tasks. Ansible playbooks are pure machine-parseable YAML.