mirror of https://github.com/ansible/ansible.git
vyos: Make vyos related yaml file passing yamllint (#65449)
parent
ae4363f6d1
commit
c19949706f
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
- { include: cli_config.yaml, tags: ['cli_config'] }
|
- {include: cli_config.yaml, tags: ['cli_config']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_vyos_tests
|
- prepare_vyos_tests
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_vyos_tests
|
- prepare_vyos_tests
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_vyos_tests
|
- prepare_vyos_tests
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,51 +1,51 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lag_interfaces replaced integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lag_interfaces replaced integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- include_tasks: _populate.yaml
|
- include_tasks: _populate.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Replace device configurations of listed LAG interfaces with provided configurations
|
- name: Replace device configurations of listed LAG interfaces with provided configurations
|
||||||
vyos_lag_interfaces: &replaced
|
vyos_lag_interfaces: &replaced
|
||||||
config:
|
config:
|
||||||
- name: bond1
|
- name: bond1
|
||||||
mode: "802.3ad"
|
mode: "802.3ad"
|
||||||
hash_policy: "layer2"
|
hash_policy: "layer2"
|
||||||
members:
|
members:
|
||||||
- member: eth2
|
- member: eth2
|
||||||
state: replaced
|
state: replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that correct set of commands were generated
|
- name: Assert that correct set of commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that before dicts are correctly generated
|
- name: Assert that before dicts are correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that after dict is correctly generated
|
- name: Assert that after dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
- "{{ replaced['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Replace device configurations of listed LAG interfaces with provided configurarions (IDEMPOTENT)
|
- name: Replace device configurations of listed LAG interfaces with provided configurarions (IDEMPOTENT)
|
||||||
vyos_lag_interfaces: *replaced
|
vyos_lag_interfaces: *replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that task was idempotent
|
- name: Assert that task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dict is correctly generated
|
- name: Assert that before dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,49 +1,49 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lldp_global merged integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lldp_global merged integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- include_tasks: _populate.yaml
|
- include_tasks: _populate.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Merge the provided configuration with the exisiting running configuration
|
- name: Merge the provided configuration with the exisiting running configuration
|
||||||
vyos_lldp_global: &merged
|
vyos_lldp_global: &merged
|
||||||
config:
|
config:
|
||||||
legacy_protocols:
|
legacy_protocols:
|
||||||
- 'fdp'
|
- 'fdp'
|
||||||
- 'cdp'
|
- 'cdp'
|
||||||
address: 192.0.2.11
|
address: 192.0.2.11
|
||||||
state: merged
|
state: merged
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that: "{{ merged['before'] == result['before'] }}"
|
that: "{{ merged['before'] == result['before'] }}"
|
||||||
|
|
||||||
- name: Assert that correct set of commands were generated
|
- name: Assert that correct set of commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that after dicts was correctly generated
|
- name: Assert that after dicts was correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['after'] == result['after'] }}"
|
- "{{ merged['after'] == result['after'] }}"
|
||||||
|
|
||||||
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
|
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
|
||||||
vyos_lldp_global: *merged
|
vyos_lldp_global: *merged
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that the previous task was idempotent
|
- name: Assert that the previous task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['after'] == result['before'] }}"
|
- "{{ merged['after'] == result['before'] }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,51 +1,51 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lldp_global replaced integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lldp_global replaced integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- include_tasks: _populate.yaml
|
- include_tasks: _populate.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Replace device configurations of LLDP service with provided configurations
|
- name: Replace device configurations of LLDP service with provided configurations
|
||||||
vyos_lldp_global: &replaced
|
vyos_lldp_global: &replaced
|
||||||
config:
|
config:
|
||||||
legacy_protocols:
|
legacy_protocols:
|
||||||
- 'edp'
|
- 'edp'
|
||||||
- 'sonmp'
|
- 'sonmp'
|
||||||
- 'cdp'
|
- 'cdp'
|
||||||
address: 192.0.2.14
|
address: 192.0.2.14
|
||||||
state: replaced
|
state: replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that correct set of commands were generated
|
- name: Assert that correct set of commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that before dicts are correctly generated
|
- name: Assert that before dicts are correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ populate == result['before'] }}"
|
- "{{ populate == result['before'] }}"
|
||||||
|
|
||||||
- name: Assert that after dict is correctly generated
|
- name: Assert that after dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] == result['after'] }}"
|
- "{{ replaced['after'] == result['after'] }}"
|
||||||
|
|
||||||
- name: Replace device configurations of LLDP service with provided configurarions (IDEMPOTENT)
|
- name: Replace device configurations of LLDP service with provided configurarions (IDEMPOTENT)
|
||||||
vyos_lldp_global: *replaced
|
vyos_lldp_global: *replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that task was idempotent
|
- name: Assert that task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dict is correctly generated
|
- name: Assert that before dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] == result['before'] }}"
|
- "{{ replaced['after'] == result['before'] }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- prepare_vyos_tests
|
- prepare_vyos_tests
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,58 +1,58 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lldp_interfaces merged integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lldp_interfaces merged integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Merge the provided configuration with the exisiting running configuration
|
- name: Merge the provided configuration with the exisiting running configuration
|
||||||
vyos_lldp_interfaces: &merged
|
vyos_lldp_interfaces: &merged
|
||||||
config:
|
config:
|
||||||
- name: 'eth1'
|
- name: 'eth1'
|
||||||
location:
|
location:
|
||||||
civic_based:
|
civic_based:
|
||||||
country_code: 'US'
|
country_code: 'US'
|
||||||
ca_info:
|
ca_info:
|
||||||
- ca_type: 0
|
- ca_type: 0
|
||||||
ca_value: 'ENGLISH'
|
ca_value: 'ENGLISH'
|
||||||
|
|
||||||
- name: 'eth2'
|
- name: 'eth2'
|
||||||
location:
|
location:
|
||||||
coordinate_based:
|
coordinate_based:
|
||||||
altitude: 2200
|
altitude: 2200
|
||||||
datum: 'WGS84'
|
datum: 'WGS84'
|
||||||
longitude: '222.267255W'
|
longitude: '222.267255W'
|
||||||
latitude: '33.524449N'
|
latitude: '33.524449N'
|
||||||
state: merged
|
state: merged
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that: "{{ merged['before'] | symmetric_difference(result['before']) |length == 0 }}"
|
that: "{{ merged['before'] | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that correct set of commands were generated
|
- name: Assert that correct set of commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that after dicts was correctly generated
|
- name: Assert that after dicts was correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
- "{{ merged['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
|
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
|
||||||
vyos_lldp_interfaces: *merged
|
vyos_lldp_interfaces: *merged
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that the previous task was idempotent
|
- name: Assert that the previous task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ merged['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ merged['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,49 +1,49 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lldp_interfaces overridden integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lldp_interfaces overridden integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- include_tasks: _populate_intf.yaml
|
- include_tasks: _populate_intf.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Overrides all device configuration with provided configuration
|
- name: Overrides all device configuration with provided configuration
|
||||||
vyos_lldp_interfaces: &overridden
|
vyos_lldp_interfaces: &overridden
|
||||||
config:
|
config:
|
||||||
- name: 'eth2'
|
- name: 'eth2'
|
||||||
location:
|
location:
|
||||||
elin: '0000000911'
|
elin: '0000000911'
|
||||||
state: overridden
|
state: overridden
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ populate_intf | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ populate_intf | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that correct commands were generated
|
- name: Assert that correct commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ overridden['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ overridden['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that after dicts were correctly generated
|
- name: Assert that after dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ overridden['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
- "{{ overridden['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Overrides all device configuration with provided configurations (IDEMPOTENT)
|
- name: Overrides all device configuration with provided configurations (IDEMPOTENT)
|
||||||
vyos_lldp_interfaces: *overridden
|
vyos_lldp_interfaces: *overridden
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that the previous task was idempotent
|
- name: Assert that the previous task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dicts were correctly generated
|
- name: Assert that before dicts were correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ overridden['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ overridden['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,63 +1,63 @@
|
|||||||
---
|
---
|
||||||
- debug:
|
- debug:
|
||||||
msg: "START vyos_lldp_interfaces replaced integration tests on connection={{ ansible_connection }}"
|
msg: "START vyos_lldp_interfaces replaced integration tests on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
|
||||||
- include_tasks: _populate.yaml
|
- include_tasks: _populate.yaml
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Replace device configurations of listed LLDP interfaces with provided configurations
|
- name: Replace device configurations of listed LLDP interfaces with provided configurations
|
||||||
vyos_lldp_interfaces: &replaced
|
vyos_lldp_interfaces: &replaced
|
||||||
config:
|
config:
|
||||||
- name: 'eth2'
|
- name: 'eth2'
|
||||||
enable: false
|
enable: false
|
||||||
location:
|
location:
|
||||||
civic_based:
|
civic_based:
|
||||||
country_code: 'US'
|
country_code: 'US'
|
||||||
ca_info:
|
ca_info:
|
||||||
- ca_type: 0
|
- ca_type: 0
|
||||||
ca_value: 'ENGLISH'
|
ca_value: 'ENGLISH'
|
||||||
|
|
||||||
- name: 'eth1'
|
- name: 'eth1'
|
||||||
enable: false
|
enable: false
|
||||||
location:
|
location:
|
||||||
coordinate_based:
|
coordinate_based:
|
||||||
altitude: 2200
|
altitude: 2200
|
||||||
datum: 'WGS84'
|
datum: 'WGS84'
|
||||||
longitude: '222.267255W'
|
longitude: '222.267255W'
|
||||||
latitude: '33.524449N'
|
latitude: '33.524449N'
|
||||||
state: replaced
|
state: replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that correct set of commands were generated
|
- name: Assert that correct set of commands were generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
- "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that before dicts are correctly generated
|
- name: Assert that before dicts are correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Assert that after dict is correctly generated
|
- name: Assert that after dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
- "{{ replaced['after'] | symmetric_difference(result['after']) |length == 0 }}"
|
||||||
|
|
||||||
- name: Replace device configurations of listed LLDP interfaces with provided configurarions (IDEMPOTENT)
|
- name: Replace device configurations of listed LLDP interfaces with provided configurarions (IDEMPOTENT)
|
||||||
vyos_lldp_interfaces: *replaced
|
vyos_lldp_interfaces: *replaced
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Assert that task was idempotent
|
- name: Assert that task was idempotent
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result['changed'] == false"
|
- "result['changed'] == false"
|
||||||
|
|
||||||
- name: Assert that before dict is correctly generated
|
- name: Assert that before dict is correctly generated
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
- "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: _remove_config.yaml
|
- include_tasks: _remove_config.yaml
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
- {include: cli.yaml, tags: ['cli']}
|
||||||
|
Loading…
Reference in New Issue