Created
July 22, 2016 22:10
-
-
Save cidrblock/95a84b445380805f444124bba20f01ca 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
--- | |
- name: test seassclrt001 | |
ios_config: | |
host: "{{ inventory_hostname }}" | |
before: ['no ip access-list standard test'] | |
parents: ['ip access-list standard test'] | |
lines: | |
- permit 1.1.1.1 | |
- permit 1.1.1.2 | |
- permit 1.1.1.3 | |
- permit 1.1.1.4 | |
replace: block | |
- name: show ACL | |
ios_command: | |
host: "{{ inventory_hostname }}" | |
commands: | |
- sho ip access-list test | |
register: output | |
- debug: msg="{{ output.stdout_lines[0] }}" | |
- name: test seassclrt001 | |
ios_config: | |
host: "{{ inventory_hostname }}" | |
before: ['no ip access-list standard test'] | |
parents: ['ip access-list standard test'] | |
lines: | |
- permit 1.1.1.1 | |
replace: block | |
match: strict | |
- name: show ACL | |
ios_command: | |
host: "{{ inventory_hostname }}" | |
commands: | |
- sho ip access-list test | |
register: output | |
- debug: msg="{{ output.stdout_lines[0] }}" |
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
< TASK [snmp-acl : test seassclrt001] > | |
------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] | |
____________________________ | |
< TASK [snmp-acl : show ACL] > | |
---------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] | |
_________________________ | |
< TASK [snmp-acl : debug] > | |
------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] => { | |
"msg": [ | |
"Standard IP access list test", | |
" 10 permit 1.1.1.1", | |
" 30 permit 1.1.1.3", | |
" 20 permit 1.1.1.2", | |
" 40 permit 1.1.1.4" | |
] | |
} | |
_____________________________________ | |
< TASK [snmp-acl : test seassclrt001] > | |
------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] | |
____________________________ | |
< TASK [snmp-acl : show ACL] > | |
---------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] | |
_________________________ | |
< TASK [snmp-acl : debug] > | |
------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || | |
ok: [seassclrt001.starbucks.net] => { | |
"msg": [ | |
"Standard IP access list test", | |
" 10 permit 1.1.1.1", | |
" 30 permit 1.1.1.3", | |
" 20 permit 1.1.1.2", | |
" 40 permit 1.1.1.4" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment