Added feature facts to nxos_facts (#45934)

* Added feature facts to nxos_facts

* Fixed ansibot indentation

* Resolved ansibot whitespace missing after ','

* Per PR suggestion, created method in base class to gather switch config
and store in global variable to prevent multiple calls to switch.

* Addressed ansibot blank line & whitespace after ,
This commit is contained in:
tstoner
2018-09-26 06:27:09 -04:00
committed by Trishna Guha
parent 2b216384eb
commit b427499e3e
2 changed files with 43 additions and 1 deletions

View File

@@ -77,4 +77,21 @@
- "result.ansible_facts.ansible_net_memfree_mb > 1"
- "result.ansible_facts.ansible_net_memtotal_mb > 1"
- name: "nxos_facts gather features facts"
nxos_facts:
gather_subset: features
provider: "{{ connection }}"
register: result
- assert:
that:
# _facts modules should never report a change
- "result.changed == false"
# Correct subsets are present
- "'features' in result.ansible_facts.ansible_net_gather_subset"
# Items from the subset is present
- "result.ansible_facts.ansible_net_features_enabled is defined"
- debug: msg="END connection={{ ansible_connection }} nxos_facts sanity test"