arista.cvp.cv_configlet_v3 (3.10.1) — module

Create, Delete, or Update CloudVision Portal Configlets.

| "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

CloudVison Portal Configlet compares the list of configlets and config in

configlets against cvp-facts then adds, deletes, or updates

them as appropriate.

If a configlet is in cvp_facts but not in configlets it will be deleted.

If a configlet is in configlets but not in cvp_facts it will be created.

If a configlet is in both configlets and cvp_facts it configuration will

be compared and updated with the version in configlets

if the two are different.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Test cv_configlet_v3
  hosts: cvp
  connection: local
  gather_facts: no
  vars:
    configlet_list:
      Test_Configlet: "! This is a Very First Testing Configlet\n!"
      Test_DYNAMIC_Configlet: "{{ lookup('file', 'templates/configlet_'+inventory_hostname+'.txt') }}"
  tasks:
    - name: "Push config"
      arista.cvp.cv_configlet_v3:
        configlets: "{{configlet_list}}"
        state: present
      register: cvp_configlet

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - If absent, configlets will be removed from CVP if not bound to a container or a
      device.
    - If present, configlets will be created or updated.
    required: false
    type: str

configlets:
    description: List of configlets to managed on CVP server.
    required: true
    type: dict

configlets_notes:
    default: Managed by Ansible
    description: Add a note to the configlets.
    required: false
    type: str