Skip to content

cv_facts_v3

cv_facts_v3

Collect facts from CloudVision

Module added in version 3.3.0

Synopsis

Returns list of devices, configlets, containers and images from CloudVision

Module-specific Options

The following options may be specified for this module:

parameter type required default choices comments
facts
list no ['configlets', 'containers', 'devices', 'images']
  • configlets
  • containers
  • devices
  • images
List of facts to retrieve from CVP.
By default, cv_facts returns facts for devices/configlets/containers/tasks
Using this parameter allows user to limit scope to a subset of information.
regexp_filter
str no .*
Regular Expression to filter configlets and devices in facts
verbose
str no short
  • long
  • short
get all data from CV or get only cv_modules data


Examples:

tasks:
- name: '#01 - Collect devices facts from {{inventory_hostname}}'
  arista.cvp.cv_facts_v3:

- name: '#02 - Collect devices facts from {{inventory_hostname}}'
  arista.cvp.cv_facts_v3:
    facts:
      - configlets
  register: FACTS_DEVICES

- name: '#03 - Collect devices facts from {{inventory_hostname}}'
  arista.cvp.cv_facts_v3:
    facts:
      - devices
      - containers
  register: FACTS_DEVICES

- name: '#04 - Collect devices facts from {{inventory_hostname}}'
  arista.cvp.cv_facts_v3:
    facts:
      - devices
    regexp_filter: "spine1"
    verbose: long
  register: FACTS_DEVICES
Author
  • Ansible Arista Team (@aristanetworks)

Last update: October 14, 2022