Changes

Jump to navigation Jump to search
16 bytes added ,  22:08, 3 August 2020
no edit summary
To sanitize any variables passed to the shell module, you should use <nowiki>"{{ var | quote }}" instead of just "{{ var }}"</nowiki> to make sure they don't include evil things like semicolons.
[[Category:Fix characters]]
== Example Commands ==
The array notation is preferred over the dot notation for accessing variables.
<nowiki>{{ ansible_eth0["ipv4"]["address"] }} over {{ ansible_eth0.ipv4.address }} </nowiki> because some keywords in Python would conflict
Reserved words:
* environemnt
'''inventory_hostname''' is the name of the hostname as configured in Ansible�s Ansible's inventory host file. '''ansible_hostname''' is the discovered hostname
You can use a variables file to put sensitive data in a different file (one excluded from git).
{{References}}
[[Category:Virtualization]]
[[Category:Configuration Management]]
[[Category:DevOps]]

Navigation menu