cvp_configlet_upload¶
Overview¶
cvp_configlet_upload, is a role that deploys configlets stored in a local folder to the CloudVision server.
Role requirements¶
This role requires to install arista.cvp
collection to support CloudVision interactions.
Role Inputs and Outputs¶
Figure 1 below provides a visualization of the role’s inputs, outputs, and tasks in order executed by the role.
- Read content of
{{ configlet_directory }}
and create cv_configlet input structure. - Collect CloudVision facts.
- Create or update configlets on CloudVision server with content from
{{ configlet_directory }}
Inputs¶
Inventory configuration¶
An entry must be part of the inventory to describe the CloudVision server. arista.cvp
modules use the httpapi approach. The example below provides a framework to use in your inventory.
all:
children:
cloudvision:
hosts:
cv_server01:
ansible_host: 10.83.28.164
ansible_user: ansible
ansible_password: ansible
ansible_connection: httpapi
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_network_os: eos
ansible_httpapi_port: 443
For complete list of authentication options available with CloudVision Ansible collection, you can read dedicated page on arista.cvp collection.
Module variables¶
configlet_directory
: Folder where local configlets are stored. Default:configlets
.file_extension
: File extension to look for configlet in their local folder. Default:conf
.configlets_cvp_prefix
: Prefix to use for configlet on CV side. Default: Not set and it’s required.execute_tasks
:true
/false
. Support automatically executing pending tasks. Default:false
.cv_collection
: Version of CloudVision collection to use. Can bev1
orv3
. Default isv3
.
Example:
tasks:
- name: Upload cvp configlets
ansible.builtin.import_role:
name: arista.avd.cvp_configlet_upload
vars:
configlet_directory: 'configlets/'
file_extension: 'txt'
configlets_cvp_prefix: 'DC1-AVD'
execute_tasks: false
cv_collection: v3
This module also supports tags to run a subset of ansible tasks:
build
: Generatecv_configlet
input structure.provision
: Runbuild
tags + configure CloudVision with information generated in previous tasks
Outputs¶
- None.
Tasks¶
- Read content of
{{ configlet_directory }}
and create cv_configlet input structure. - Collect CloudVision facts.
- Create or update configlets on CloudVision server with content from
{{ configlet_directory }}
Requirements¶
Requirements are located here: avd-requirements
License¶
Project is published under Apache 2.0 License