mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user