Practice – devcor_350-901_Ansible_Terraform

Strength:
0%
Answered: 0 • Correct: 0 • Incorrect: 0

Logged in as Guest

AT 16: Ansible - complete Jinja2 template to generate ACL WEB_IN lines from a list of rule objects.

Drag the correct code snippets from the options panel into the placeholders in the code window.

# templates/WEB_IN.j2 ip access-list extended WEB_IN {% for rule in {{1}} %} permit {'tcp' if rule.proto == 'tcp' else 'ip'} any host {{2}} eq {{3}} {% endfor %}

Drag a snippet from the right into each blank box in the code.

Available snippets

hosts
80
443
{{ item.ip }}
{{ rule.dst_ip }}
acl_rules
{{ rule.dst_port }}