inventory_to_container¶
Transform information from inventory to arista.cvp collection
Module added in version 2.9
Synopsis¶
Transform information from ansible inventory to be able to provision CloudVision Platform using arista.cvp collection and its specific data structure.
Module-specific Options¶
The following options may be specified for this module:
parameter | type | required | default | choices | comments |
---|---|---|---|---|---|
configlet_dir |
str | no |
Directory where intended configurations are located.
|
||
configlet_prefix |
str | no |
Prefix to put on configlet.
|
||
container_root |
str | yes |
Ansible group name to consider to be Root of our topology.
|
||
destination |
str | no |
Optional path to save variable.
|
||
device_filter |
list | no | ['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.
|
|
inventory |
str | yes |
YAML inventory file
|
Examples¶
```yaml - name: Generate intended variables arista.avd.inventory_to_container: 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 }}.’ arista.cvp.cv_facts: register: cvp_facts
- name: ‘Create configlets on CVP {{ inventory_hostname }}.’ arista.cvp.cv_configlet: cvp_facts: “{{ cvp_facts.ansible_facts }}” configlets: “{{ cvp_vars.cvp_configlets }}” configlet_filter: [“AVD”]
- name: “Building Container topology on {{ inventory_hostname }}” arista.cvp.cv_container: topology: ‘{{ cvp_vars.cvp_topology }}’ cvp_facts: ‘{{ cvp_facts.ansible_facts }}’ save_topology: true
- Ansible Arista Team (@aristanetworks)
Status¶
This module is flagged as preview which means that it’s not guaranteed to have a backwards compatible interface.
Last update:
February 17, 2023