arista.cvp.cv_container_v3 (3.10.1) — module

Manage Provisioning topology.

| "added in version" 3.0.0 of arista.cvp"

Authors: Ansible Arista Team (@aristanetworks)

Install collection

Install with ansible-galaxy collection install arista.cvp:==3.10.1


Add to requirements.yml

  collections:
    - name: arista.cvp
      version: 3.10.1

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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

Inputs

    
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