Skip to content

Instantly share code, notes, and snippets.

@jffz
Created September 10, 2019 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jffz/72265f963938d0a63d8f733aacfeff5d to your computer and use it in GitHub Desktop.
Save jffz/72265f963938d0a63d8f733aacfeff5d to your computer and use it in GitHub Desktop.
[Ansible] Use facts to lookup variables in jinja2 template
{% for item in ssh[(ansible_distribution | lower)][(ansible_distribution_major_version | int)] %}
- {{ item }}
{% endfor %}
---
ssh:
ubuntu:
18:
- test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment