Skip to content

Instantly share code, notes, and snippets.

@oharsta
Created February 12, 2025 10:07
Show Gist options
  • Save oharsta/5425e0fd866b42024f79581590f1b069 to your computer and use it in GitHub Desktop.
Save oharsta/5425e0fd866b42024f79581590f1b069 to your computer and use it in GitHub Desktop.
testing ansible playbooks
- hosts: localhost
gather_facts: no
vars:
my_var: "en,nl"
tasks:
- debug:
msg: |
{% for lang in my_var.split(',') %}
Language: {{ lang }}
{% endfor %}
# run with ansible-playbook test.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment