mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.1 KiB
YAML
62 lines
1.1 KiB
YAML
7 years ago
|
---
|
||
7 years ago
|
- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_acl sanity test"
|
||
7 years ago
|
|
||
|
- name: "Setup: Cleanup possibly existing acl."
|
||
|
nxos_acl: &remove
|
||
|
name: TEST_ACL
|
||
|
seq: 10
|
||
|
state: absent
|
||
7 years ago
|
provider: "{{ connection }}"
|
||
7 years ago
|
ignore_errors: yes
|
||
|
|
||
|
- name: "Configure ACL"
|
||
|
nxos_acl: &configure
|
||
|
name: TEST_ACL
|
||
|
seq: 10
|
||
|
action: permit
|
||
|
proto: tcp
|
||
|
src: 1.1.1.1/24
|
||
|
src_port_op: range
|
||
|
src_port1: 5
|
||
|
src_port2: 20
|
||
|
ack: 'enable'
|
||
|
dscp: 'af43'
|
||
|
dest: any
|
||
|
urg: 'enable'
|
||
|
psh: 'enable'
|
||
|
established: 'enable'
|
||
|
log: 'enable'
|
||
|
fin: 'enable'
|
||
|
rst: 'enable'
|
||
|
syn: 'enable'
|
||
|
time_range: 'ans-range'
|
||
|
state: present
|
||
7 years ago
|
provider: "{{ connection }}"
|
||
7 years ago
|
register: result
|
||
|
|
||
|
- assert: &true
|
||
|
that:
|
||
|
- "result.changed == true"
|
||
|
|
||
|
- name: "Check Idempotence"
|
||
|
nxos_acl: *configure
|
||
|
register: result
|
||
|
|
||
|
- assert: &false
|
||
|
that:
|
||
|
- "result.changed == false"
|
||
|
|
||
|
- name: "Remove ACL"
|
||
|
nxos_acl: *remove
|
||
|
register: result
|
||
|
|
||
|
- assert: *true
|
||
|
|
||
|
- name: "Check Idempotence"
|
||
|
nxos_acl: *remove
|
||
|
register: result
|
||
|
|
||
|
- assert: *false
|
||
|
|
||
7 years ago
|
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_acl sanity test"
|