Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible code bot recommendations #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ coverage:
patch: false
project:
default:
threshold: 0.3%
threshold: "0.3%"
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors:
- Ansible Network Community (ansible-network)
dependencies:
"ansible.netcommon": ">=2.5.1"
ansible.netcommon: ">=2.5.1"
license_file: LICENSE
name: ios
namespace: cisco
Expand All @@ -11,4 +11,4 @@ readme: README.md
repository: https://github.com/ansible-collections/cisco.ios
issues: https://github.com/ansible-collections/cisco.ios/issues
tags: [cisco, ios, iosxe, networking]
version: "5.1.0"
version: 5.1.0
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
- name: Remove configuration
vars:
lines:
"interface GigabitEthernet 2\nno ip access-group 110 in\nno ip access-group 100 out\nno ip access-group 123 out\nno ipv6 traffic-filter temp_v6 in\n\
no ipv6 traffic-filter test_v6 out\ninterface GigabitEthernet 3\nno ip access-group 110 in\nno ip access-group 123 out\n"
lines: "interface GigabitEthernet 2\nno ip access-group 110 in\nno ip access-group 100 out\nno ip access-group 123 out\nno ipv6 traffic-filter temp_v6 in\nno
ipv6 traffic-filter test_v6 out\ninterface GigabitEthernet 3\nno ip access-group 110 in\nno ip access-group 123 out\n"
ansible.netcommon.cli_config:
config: "{{ lines }}"
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
- name: Populate configuration
vars:
lines:
"ip access-list extended test_acl\ndeny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10\nip access-list extended 110\n\
deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10\nip access-list extended 123\ndeny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255\
\ eq telnet ack tos 12\ndeny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20\nipv6 access-list R1_TRAFFIC\ndeny tcp any eq www any\
\ eq telnet ack dscp af11\n"
lines: "ip access-list extended test_acl\ndeny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10\nip access-list extended 110\n
deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10\nip access-list extended 123\ndeny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255
eq telnet ack tos 12\ndeny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20\nipv6 access-list R1_TRAFFIC\ndeny tcp any eq www any eq
telnet ack dscp af11\n"
ansible.netcommon.cli_config:
config: "{{ lines }}"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Delete ACL attributes based on AFI
register: result
cisco.ios.ios_acls: &id002
cisco.ios.ios_acls:
config:
- afi: ipv4
- afi: ipv6
Expand Down
22 changes: 11 additions & 11 deletions tests/integration/targets/ios_acls/tests/cli/merged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
fin: true
source:
address: 192.0.4.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.5.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
option:
Expand All @@ -46,7 +46,7 @@
sequence: 10
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
- name: test_acl
acl_type: extended
aces:
Expand All @@ -58,10 +58,10 @@
fin: true
source:
address: 192.0.4.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.5.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
option:
Expand All @@ -78,10 +78,10 @@
echo: true
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
dscp: ef
ttl:
eq: 10
Expand All @@ -95,10 +95,10 @@
ack: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 198.51.101.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
tos:
Expand All @@ -111,10 +111,10 @@
ack: true
source:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.4.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/targets/ios_acls/tests/cli/overridden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
sequence: 10
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand All @@ -44,10 +44,10 @@
ack: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 198.51.101.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
tos:
Expand All @@ -62,12 +62,12 @@
syn: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
dscp: ef
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/targets/ios_acls/tests/cli/rendered.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
syn: true
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand All @@ -38,12 +38,12 @@
syn: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
dscp: ef
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/targets/ios_acls/tests/cli/replaced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
sequence: 10
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand All @@ -42,10 +42,10 @@
ack: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 198.51.101.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
tos:
Expand All @@ -60,12 +60,12 @@
syn: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
dscp: ef
Expand Down
28 changes: 14 additions & 14 deletions tests/integration/targets/ios_acls/tests/cli/rtt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
fin: true
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
option:
Expand All @@ -43,10 +43,10 @@
echo: true
source:
address: 192.0.2.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
dscp: ef
ttl:
eq: 10
Expand All @@ -60,10 +60,10 @@
ack: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 198.51.101.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
tos:
Expand All @@ -76,10 +76,10 @@
ack: true
source:
address: 192.0.3.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 192.0.4.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand Down Expand Up @@ -130,12 +130,12 @@
sequence: 10
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: www
dscp: ef
Expand All @@ -150,10 +150,10 @@
ack: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
destination:
address: 198.51.101.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
tos:
Expand All @@ -167,12 +167,12 @@
syn: true
source:
address: 198.51.100.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
destination:
address: 198.51.110.0
wildcard_bits: 0.0.0.255
wildcard_bits: "0.0.0.255"
port_protocol:
eq: telnet
dscp: ef
Expand Down
Loading