Hi all
I searching for a Jinja2 that can help me with my cisco router acls.
And I found this but not sure if this will help me create my acls
{% for key, value in vars['access_lists']|dictsort(false, 'key') %}
{% if value['type'] == 'standard' %}
{% for entry in value['entries'] %}
{% if 'action' in entry %}
{% if entry['source_wildcard'] == '0.0.0.0' %}
- parents:
lines:
- access-list {{ value['number'] }} {{ entry['action'] }}{{
entry['whitespace'] }}{{ entry['source_network'] }}
{% elif entry['source_network'] == 'any' %}
- parents:
lines:
- access-list {{ value['number'] }} {{ entry['action'] }}{{
entry['whitespace'] }}{{ entry['source_network'] }}
{% else %}
- parents:
lines:
- access-list {{ value['number'] }} {{ entry['action'] }}{{
entry['whitespace'] }}{{ entry['source_network'] }} {{
entry['source_wildcard'] }}
{% endif %}
{% endif %}
{% if 'remark' in entry %}
- parents:
lines:
- access-list {{ value['number'] }} remark {{ entry['remark'] }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
Any ideas?
Thanks
--
Juraj A Papic
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAAjdA%2BaEnKu7%3DqhUmrJRLDzn__dEQzbxnGs8jaUG1P%2B_co5Jhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.