Fix junos facts integration test failures (#42623)

*  Make fetching old style facts optional
   and try to fetch the old style facts only when
   `ofacts` value is present in `gather_facts`
* Fix in junos_facts integration test
This commit is contained in:
Ganesh Nalawade 2018-07-12 09:53:03 +05:30 committed by GitHub
parent d723b8541d
commit 6a94090e7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

@ -50,7 +50,7 @@
- assert:
that:
- "result.failed == true"
- "result.msg == 'Subset must be one of [hardware, default, interfaces, config], got test'"
- "result.msg == 'Subset must be one of [hardware, default, ofacts, config, interfaces], got test'"
- name: Collect config facts from device in set format
junos_facts:
@ -92,7 +92,7 @@
- assert:
that:
- "result.changed == false"
- "'{{ result['ansible_facts']['ansible_net_config']['configuration']['system']['service']['netconf'] }}' is defined"
- "'ssh' in result['ansible_facts']['ansible_net_config']['configuration']['system']['services']['netconf']"
when: ansible_net_version == "17.3R1.10"
- name: Collect config facts from device in text format