Created
January 9, 2020 16:25
-
-
Save NilashishC/dabb506e3acb2f9db247a883098b9558 to your computer and use it in GitHub Desktop.
This file contains 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
--- | |
- hosts: xrv-9k-612 | |
gather_facts: no | |
vars: | |
acl_to_replace: | |
- name: acl_4 | |
aces: | |
- sequence: 10 | |
source: | |
any: True | |
destination: | |
any: True | |
- name: acl_5 | |
aces: | |
- sequence: 50 | |
source: | |
host: 192.168.1.100 | |
destination: | |
any: True | |
tasks: | |
- iosxr_facts: | |
gather_subset: | |
- '!all' | |
- '!min' | |
gather_network_resources: | |
- acls | |
- set_fact: | |
afi_ipv4: "{{ item }}" | |
when: item['afi'] == 'ipv6' | |
loop: "{{ ansible_facts['network_resources']['acls'] }}" | |
- set_fact: | |
updated_afi_to_config: "{{ afi_ipv4['acls'] + acl_to_replace }}" | |
- debug: | |
var: updated_afi_to_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment