From b8ee80ac4efffe74c545def6f38e7f8ca46a91c9 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Mon, 9 Jan 2017 20:15:16 +0000 Subject: [PATCH] junos Use inventory_hostname_short (#20061) Don't use hardcoded hostnames --- .../targets/junos_command/tests/netconf_text/contains.yaml | 2 +- .../targets/junos_command/tests/netconf_xml/contains.yaml | 2 +- .../targets/junos_command/tests/netconf_xml/equal.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/junos_command/tests/netconf_text/contains.yaml b/test/integration/targets/junos_command/tests/netconf_text/contains.yaml index 30a3d1fd18..00745cbe2e 100644 --- a/test/integration/targets/junos_command/tests/netconf_text/contains.yaml +++ b/test/integration/targets/junos_command/tests/netconf_text/contains.yaml @@ -8,7 +8,7 @@ - show interfaces fxp0 display: text wait_for: - - "result[0] contains vsrx01" + - "result[0] contains {{ inventory_hostname_short }}" - "result[1] contains fxp0" provider: "{{ netconf }}" register: result diff --git a/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml b/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml index fa79d8957d..a111d57955 100644 --- a/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml +++ b/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml @@ -8,7 +8,7 @@ - show interfaces fxp0 format: xml wait_for: - - "result[0].software-information.host-name contains vsrx01" + - "result[0].software-information.host-name contains {{ inventory_hostname_short }}" - "result[1].interface-information.physical-interface.name contains fxp0" provider: "{{ netconf }}" register: result diff --git a/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml b/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml index 3240488cb3..9afdf36c4c 100644 --- a/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml +++ b/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml @@ -7,7 +7,7 @@ - show version - show interfaces fxp0 wait_for: - - "result[0].software-information.host-name == vsrx01" + - "result[0].software-information.host-name == {{ inventory_hostname_short }}" - "result[1].interface-information.physical-interface.name == fxp0" format: xml provider: "{{ netconf }}" @@ -25,7 +25,7 @@ - show version - show interfaces fxp0 wait_for: - - "result[0].software-information.host-name eq vsrx01" + - "result[0].software-information.host-name eq {{ inventory_hostname_short }}" - "result[1].interface-information.physical-interface.name eq fxp0" format: xml provider: "{{ netconf }}"