Deprecated

Removed in 4.0.0

i

Reason:Updated modules released with increased functionality | Alternative:Use M(arista.cvp.cv_configlet_v3) instead.

arista.cvp.cv_configlet (3.10.1) — module

Create, Delete, or Update CloudVision Portal Configlets.

| "added in version" 1.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_v2
  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: 'Collecting facts from CVP {{inventory_hostname}}.'
      tags:
        - always
      cv_facts:
      register: cvp_facts

    - name: 'Create configlets on CVP {{inventory_hostname}}.'
      tags:
        - provision
      cv_configlet:
        cvp_facts: "{{cvp_facts.ansible_facts}}"
        configlets: "{{configlet_list}}"
        configlets_notes: "Configlet managed by Ansible"
        configlet_filter: ["New", "Test","base-chk","base-firewall"]
      register: cvp_configlet

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - 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.
    required: false
    type: str

options:
    description: Implements the ability to create a sub-argument_spec, where the sub options
      of the top level argument are also validated using the attributes discussed in this
      section.
    required: false
    type: dict

cvp_facts:
    description: Facts extracted from CVP servers using cv_facts module.
    required: true
    type: dict

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

filter_mode:
    choices:
    - loose
    - strict
    default: loose
    description:
    - If loose, a match is when a configlet matches a substring of a configlet defined
      in the filter.
    - If strict, a match is when a configlet exactly matches a configlet defined in the
      filter.
    required: false
    type: str

configlet_filter:
    default:
    - none
    description: Filter to apply intended mode on a set of configlet. If not used, then
      module only uses ADD mode. configlet_filter list configlets that can be modified
      or deleted based on configlets entries.
    elements: str
    required: false
    type: list

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