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.
ansible/test/integration/targets/eos_acls/tests/common/gathered.yaml

38 lines
845 B
YAML

5 years ago
---
- debug:
msg: "START eos_acls gathered integration tests on connection={{ ansible_connection }}"
- include_tasks: _populate.yaml
- block:
- name: Gathered the provided configuration with the exisiting running configuration
eos_acls: &gathered
config:
state: gathered
become: yes
register: result
- eos_facts:
gather_network_resources: acls
become: yes
- name: Assert
assert:
that:
- "ansible_facts.network_resources.acls | symmetric_difference(result.gathered) == []"
- name: Gather the existing running configuration (IDEMPOTENT)
eos_acls: *gathered
become: yes
register: result
- name: Assert that the previous task was idempotent
assert:
that:
- "result['changed'] == false"
always:
- include_tasks: _remove_config.yaml