42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
|
---
|
||
|
- debug:
|
||
|
msg: "Start ios_acl_interfaces replced integration tests ansible_connection={{ ansible_connection }}"
|
||
|
|
||
|
- include_tasks: _populate_config.yaml
|
||
|
|
||
|
- block:
|
||
|
|
||
|
- name: Replaces device configuration of listed acl_interfaces with provided configuration
|
||
|
ios_acl_interfaces: &replaced
|
||
|
config:
|
||
|
- name: GigabitEthernet0/1
|
||
|
access_groups:
|
||
|
- afi: ipv4
|
||
|
acls:
|
||
|
- name: 100
|
||
|
direction: out
|
||
|
- name: 110
|
||
|
direction: in
|
||
|
state: replaced
|
||
|
become: yes
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.commands|length == 5"
|
||
|
- "result.changed == true"
|
||
|
- "result.commands|symmetric_difference(replaced.commands) == []"
|
||
|
|
||
|
- name: Replaces device configuration of listed acl_interfaces with provided configuration (IDEMPOTENT)
|
||
|
ios_acl_interfaces: *replaced
|
||
|
become: yes
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.commands|length == 0"
|
||
|
- "result.changed == false"
|
||
|
|
||
|
always:
|
||
|
- include_tasks: _remove_config.yaml
|