Module cv_device_v3
cv_device_v3¶
Manage Provisioning topology.
Module added in version 3.0.0
Synopsis¶
CloudVision Portal Configlet configuration requires a dictionary of containers with their parent, to create and delete containers on CVP side. Returns number of created and/or deleted containers
Module-specific Options¶
The following options may be specified for this module:
parameter | type | required | default | choices | comments |
---|---|---|---|---|---|
apply_mode |
str | no | loose |
|
Set how configlets are attached/detached on device. If set to strict all configlets not listed in your vars are detached.
|
devices |
list | yes |
List of devices with their container and configlets information
|
||
search_key |
str | no | hostname |
|
Key name to use to look for device in Cloudvision.
|
state |
str | no | present |
|
Set if ansible should build or remove devices on CLoudvision
|
Examples:¶
# task in loose mode using fqdn (default)
- name: Device Management in Cloudvision
hosts: cv_server
connection: local
gather_facts: false
collections:
- arista.cvp
vars:
CVP_DEVICES:
- fqdn: CV-ANSIBLE-EOS01
parentContainerName: ANSIBLE
configlets:
- 'CV-EOS-ANSIBLE01'
tasks:
- name: "Configure devices on {{inventory_hostname}}"
arista.cvp.cv_device_v3:
devices: '{{CVP_DEVICES}}'
state: present
search_key: fqdn
# task in loose mode using serial
- name: Device Management in Cloudvision
hosts: cv_server
connection: local
gather_facts: false
collections:
- arista.cvp
vars:
CVP_DEVICES:
- serialNumber: xxxxxxxxxxxx
parentContainerName: ANSIBLE
configlets:
- 'CV-EOS-ANSIBLE01'
tasks:
- name: "Configure devices on {{inventory_hostname}}"
arista.cvp.cv_device_v3:
devices: '{{CVP_DEVICES}}'
state: present
search_key: serialNumber
# task in strict mode
- name: Device Management in Cloudvision
hosts: cv_server
connection: local
gather_facts: false
collections:
- arista.cvp
vars:
CVP_DEVICES:
- fqdn: CV-ANSIBLE-EOS01
parentContainerName: ANSIBLE
configlets:
- 'CV-EOS-ANSIBLE01'
tasks:
- name: "Configure devices on {{inventory_hostname}}"
arista.cvp.cv_device_v3:
devices: '{{CVP_DEVICES}}'
state: present
apply_mode: strict
Author¶
- Ansible Arista Team (@aristanetworks)
Last update:
July 22, 2022