Skip to content

cv\_facts

cv_facts

Collect facts from CloudVision Portal.

Synopsis

Returns list of devices, configlets, containers and images

Module-specific Options

The following options may be specified for this module:

parameter type required default choices comments
facts
list no ['all']
  • all
  • devices
  • containers
  • configlets
  • tasks
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.
gather_subset
list no ['default']
  • default
  • config
  • tasks_pending
  • tasks_failed
  • tasks_all
When supplied, this argument will restrict the facts collected
to a given subset. Possible values for this argument include
all, hardware, config, and interfaces. Can specify a list of
values to include a larger subset. Values can also be used
with an initial ! to specify that a specific subset should
not be collected.


Examples:

---
  tasks:
    - name: '#01 - Collect devices facts from {{inventory_hostname}}'
      cv_facts:
        facts:
          devices
      register: FACTS_DEVICES

    - name: '#02 - Collect devices facts (with config) from {{inventory_hostname}}'
      cv_facts:
        gather_subset:
          config
        facts:
          devices
      register: FACTS_DEVICES_CONFIG

    - name: '#03 - Collect confilgets facts from {{inventory_hostname}}'
      cv_facts:
        facts:
          configlets
      register: FACTS_CONFIGLETS

    - name: '#04 - Collect containers facts from {{inventory_hostname}}'
      cv_facts:
        facts:
          containers
      register: FACTS_CONTAINERS

    - name: '#10 - Collect ALL facts from {{inventory_hostname}}'
      cv_facts:
      register: FACTS
Author

- EMEA AS Team (@aristanetworks)


Last update: March 18, 2021