Open main menu

Changes

81 bytes added ,  23:30, 27 November 2018
no edit summary
You can use the '''command module''' (secure but simple) or the '''[https://docs.ansible.com/ansible/shell_module.html shell module]'''. The latter may be useful if you need to run bash explicitly (defaults to /bin/sh); or anytime you need $HOME and redirection.
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.
* environemnt
'''inventory_hostname''' is the name of the hostname as configured in 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).
* [http://jinja.pocoo.org/docs/dev/ Jinja] - the template engine for Ansible
* [https://cheat.readthedocs.io/en/latest/ansible/index.html Dan's Cheat Sheets]
{{References}}
[[Category:Configuration Management]]
[[Category:DevOps]]
4,558

edits