Created
July 24, 2014 21:44
-
-
Save tgerla/24ad3af5a931cc55c0c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make a template file called, say, rules-generator.j2: | |
{% for cidr_ip in aws_trusted_networks %} | |
- proto: tcp | |
from_port: 22 | |
to_port: 22 | |
cidr_ip: {% cidr_ip %} | |
{% endfor %} | |
In your playbook, do: | |
... | |
rules: "{{ lookup('template', 'rules-generator.j2')|from_yaml }}" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment