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/nxos_interface/tests/common/set_state_present.yaml

38 lines
921 B
YAML

---
- debug: msg="START connection={{ ansible_connection }}/set_state_present.yaml"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: setup
nxos_config:
lines:
- no interface Loopback1
provider: "{{ connection }}"
ignore_errors: yes # Fails if the interface is already absent
- name: set state=present
nxos_interface:
interface: Loopback1
provider: "{{ connection }}"
state: present
description: 'Configured by Ansible - Layer3'
register: result
- assert:
that:
- "result.changed == true"
- name: verify state=present
nxos_interface:
interface: Loopback1
provider: "{{ connection }}"
state: present
description: 'Configured by Ansible - Layer3'
register: result
- assert:
that:
- "result.changed == false"
- debug: msg="END connection={{ ansible_connection }}/set_state_present.yaml"