Skip to content

Module cv_configlet_v3

cv_configlet_v3

Create, Delete, or Update CloudVision Portal Configlets.

Module added in version 3.0.0

Synopsis

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.

Module-specific Options

The following options may be specified for this module:

parameter type required default choices comments
configlets
dict yes
List of configlets to managed on CVP server.
configlets_notes
str no Managed by Ansible
Add a note to the configlets.
state
str no present
  • present
  • absent
If absent, configlets will be removed from CVP if they are not bound
to either a container or a device.
If present, configlets will be created or updated.


Examples:

---
- 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: 'Create configlets on CVP {{inventory_hostname}}.'
      tags:
        - provision
      cv_configlet:
        configlets: "{{configlet_list}}"
        configlets_notes: "Configlet managed by Ansible"
      register: cvp_configlet
Author

- EMEA AS Team (@aristanetworks)


Last update: April 28, 2021


Back to top