Ansible Variable

Hello,

in one of the excerise the inv file is :
db1 ansible_host=server4.company.com ansible_connection=winrm ansible_user=administrator ansible_ssh_pass=Password123!
we need to use ansible_host variable in our playbook. In solution I see the variable is being used as ansible_host, rather that {{ ansible_host }}
Same is in next question’s solution
image

age is not being used as {{ age }}

May I know how can we differentiate where to use with {{}} and where to use without {{}}

Thanks
Ashish

you can use {{}} anywhere, but you will get some warnings conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. So, with condition statement, you should use ‘’, otherwise use {{}}

Understood. Thank You Very Much.

–Ashish

With pleasure! Happy learning