Skip to content



Always use the FQCN (Fully Qualified Collection Name) arista.avd.inventory_to_container when using this plugin.

Transform information from inventory to arista.cvp collection


Transform information from ansible inventory to be able to provision CloudVision Platform using arista.cvp collection and its specific data structure.


Argument Type Required Default Value Restrictions Description
inventory str False None Optional YAML inventory file to parse. If not set the loaded inventory will be parsed.
container_root str True None Ansible group name to consider to be Root of our topology.
configlet_dir str False None Directory where intended configurations are located.
configlet_prefix str False AVD Prefix to put on configlet.
destination str False None Optional path to save variable.
device_filter list False [‘all’] Filter to apply intended mode on a set of configlet. If not used, then module only uses ADD mode. device_filter list devices that can be modified or deleted based on configlets entries.


- name: generate intended variables
    inventory: 'inventory.yml'
    container_root: 'DC1_FABRIC'
    configlet_dir: 'intended_configs'
    configlet_prefix: 'AVD'
    device_filter: ['DC1-LE']
    # destination: 'generated_vars/{{ inventory_hostname }}.yml'
  register: cvp_vars

- name: 'Collecting facts from CVP {{ inventory_hostname }}.'
  register: cvp_facts

- name: 'Create configlets on CVP {{ inventory_hostname }}.'
    cvp_facts: "{{ cvp_facts.ansible_facts }}"
    configlets: "{{ cvp_vars.cvp_configlets }}"
    configlet_filter: ["AVD"]

- name: "Building Container topology on {{ inventory_hostname }}"
    topology: '{{ cvp_vars.cvp_topology }}'
    cvp_facts: '{{ cvp_facts.ansible_facts }}'
    save_topology: true


  • Ansible Arista Team (@aristanetworks)