Fix junos integration test failures (#35508)

* More integration testcase fixes for junos_facts
This commit is contained in:
Ganesh Nalawade 2018-01-31 00:07:01 +05:30 committed by GitHub
parent eb14eac1c6
commit ef34eb1a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@
- assert:
that:
- "result.changed == false"
- "'<host-name>{{ inventory_hostname_short }}</host-name>' in result['ansible_facts']['ansible_net_config']"
- "'<netconf>' in result['ansible_facts']['ansible_net_config']"
- name: Collect config facts from device in json format
junos_facts:
@ -86,13 +86,13 @@
- assert:
that:
- "result.changed == false"
- "'{{ inventory_hostname_short }}' == '{{ result['ansible_facts']['ansible_net_config']['configuration'][0]['system'][0]['host-name'][0]['data'] }}' "
- "'{{ result['ansible_facts']['ansible_net_config']['configuration'][0]['system'][0]['service'][0]['netconf'] }}' is defined"
when: ansible_net_version == "15.1X49-D15.4"
- assert:
that:
- "result.changed == false"
- "'{{ inventory_hostname_short }}' == '{{ result['ansible_facts']['ansible_net_config']['configuration']['system']['host-name'] }}' "
- "'{{ result['ansible_facts']['ansible_net_config']['configuration']['system']['service']['netconf'] }}' is defined"
when: ansible_net_version == "17.3R1.10"
- name: Collect config facts from device in text format
@ -105,6 +105,6 @@
- assert:
that:
- "result.changed == false"
- "'system {\n host-name {{ inventory_hostname_short }};' in result['ansible_facts']['ansible_net_config']"
- "'netconf {' in result['ansible_facts']['ansible_net_config']"
- debug: msg="END netconf/facts.yaml on connection={{ ansible_connection }}"