Skip to content

Instantly share code, notes, and snippets.

@Raboo
Last active April 5, 2025 10:52
Show Gist options
  • Save Raboo/d0a4d871eba5a3fe162ed32b5a4d6f8f to your computer and use it in GitHub Desktop.
Save Raboo/d0a4d871eba5a3fe162ed32b5a4d6f8f to your computer and use it in GitHub Desktop.
render ansible jinja2 templates
ansible all -i localhost, -c local -m template -a "src=test.j2 dest=./test.txt" --extra-vars=@group_vars/all.yml
ansible all -i "localhost," -c local -m template -a "src=test.j2 dest=./test.txt" --extra-vars='{"users": ["Mike", "Smith", "Klara", "Alex"]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment