Add proper hostname cleanup for nxos tests (#61810)
This commit is contained in:
parent
b03091213d
commit
c5a4086ed7
2 changed files with 27 additions and 5 deletions
|
@ -1,4 +1,15 @@
|
||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
# Some of the tests in this suite change the hostname to switch.
|
||||||
- { include: nxapi.yaml, tags: ['nxapi'] }
|
# This block/always ensures the hostname gets changed back to
|
||||||
- { include: cli_config.yaml, tags: ['cli_config'] }
|
# the correct name.
|
||||||
|
- block:
|
||||||
|
- { include: cli.yaml, tags: ['cli'] }
|
||||||
|
- { include: nxapi.yaml, tags: ['nxapi'] }
|
||||||
|
- { include: cli_config.yaml, tags: ['cli_config'] }
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: "Change hostname back to {{ inventory_hostname_short }}"
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
|
match: none
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
---
|
---
|
||||||
- { include: cli.yaml, tags: ['cli'] }
|
# Some of the tests in this suite change the hostname to switch.
|
||||||
- { include: nxapi.yaml, tags: ['nxapi'] }
|
# This block/always ensures the hostname gets changed back to
|
||||||
|
# the correct name.
|
||||||
|
- block:
|
||||||
|
- { include: cli.yaml, tags: ['cli'] }
|
||||||
|
- { include: nxapi.yaml, tags: ['nxapi'] }
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: "Change hostname back to {{ inventory_hostname_short }}"
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
|
match: none
|
||||||
|
|
Loading…
Reference in a new issue