Page MenuHomeVyOS Platform

replaced.yaml
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

replaced.yaml

---
- debug:
msg: START vyos_interfaces replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
- block:
- name: Replace device configurations of listed interfaces with provided configurations
register: result
vyos.vyos.vyos_interfaces: &id001
config:
- name: eth1
description: Replaced by Ansible
vifs:
- vlan_id: 100
description: VIF 100 - Replaced by Ansible
- name: eth2
mtu: 1400
description: Replaced by Ansible
state: replaced
- name: Assert that correct set of commands were generated
assert:
that:
- replaced['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that before dicts are correctly generated
assert:
that:
- populate | symmetric_difference(result['before']) |length == 0
- name: Assert that after dict is correctly generated
assert:
that:
- replaced['after'] | symmetric_difference(result['after']) |length == 0
- vyos.vyos.vyos_facts:
gather_network_resources: interfaces
- name: Assert that the facts and the after dict are the same
assert:
that:
- result.after == ansible_facts['network_resources']['interfaces']
- name: Replace device configurations of listed interfaces with provided configurarions (IDEMPOTENT)
register: result
vyos.vyos.vyos_interfaces: *id001
- name: Assert that task was idempotent
assert:
that:
- result['changed'] == false
- name: Assert that before dict is correctly generated
assert:
that:
- replaced['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_config.yaml

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 9, 10:51 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3104216
Default Alt Text
replaced.yaml (1 KB)

Event Timeline