arista / arista.cvp / 3.10.1 / module / cv_container_v3 Manage Provisioning topology. | "added in version" 3.0.0 of arista.cvp" Authors: Ansible Arista Team (@aristanetworks)arista.cvp.cv_container_v3 (3.10.1) — module
Install with ansible-galaxy collection install arista.cvp:==3.10.1
collections: - name: arista.cvp version: 3.10.1
CloudVision Portal Configlet configuration requires a dictionary of containers with their parent, to create and delete containers on CVP side.
The Module also supports assigning configlets at the container level.
Returns number of created and/or deleted containers.
With the argument `apply_mode` set to `loose` the module will only add new containers.
When `apply_mode` is set to `strict` the module will try to remove unspecified containers from CloudVision.
This will fail if the container has configlets attached to it or devices are placed in the container.
# task in loose mode (default) - name: Create container topology on CVP hosts: cvp connection: local gather_facts: no vars: verbose: False CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: parentContainerName: Fabric configlets: - container_configlet tasks: - name: 'running cv_container' arista.cvp.cv_container_v3: topology: "{{CVP_CONTAINERS}}"
# task in strict mode - name: Create container topology on CVP hosts: cvp connection: local gather_facts: no vars: verbose: False CVP_CONTAINERS: Fabric: parentContainerName: Tenant Spines: parentContainerName: Fabric configlets: - container_configlet tasks: - name: 'running cv_container' arista.cvp.cv_container_v3: topology: "{{CVP_CONTAINERS}}" apply_mode: strict
state: choices: - present - absent default: present description: Set if Ansible should build or remove devices on CloudVision. required: false type: str topology: description: YAML dictionary to describe intended containers. required: true type: dict apply_mode: choices: - loose - strict default: loose description: Set how configlets are attached/detached to containers. If set to strict all configlets not listed in your vars will be detached. required: false type: str