arista.cvp.cv_validate_v3 (3.10.1) — module

CVP/Local configlet Validation

| "added in version" 3.7.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

CloudVision Portal Validate module to Validate configlets against a device on CVP.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# offline validation
- name: offline configlet validation
  hosts: cv_server
  connection: local
  gather_facts: no
  vars:
    CVP_DEVICES:
      - device_name: leaf1
        search_type: hostname #[hostname | serialNumber | fqdn]
        local_configlets:
          valid: "interface Ethernet1\n  description test_validate"
          error: "ruter bgp 1111\n   neighbor 1.1.1.1 remote-bs 111"

  tasks:
    - name: validate module
      arista.cvp.cv_validate_v3:
        devices: "{{CVP_DEVICES}}"
        validate_mode: stop_on_error # | stop_on_warning | valid
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# online validation
- name: Online configlet validation
  hosts: cv_server
  connection: local
  gather_facts: no
  vars:
    CVP_DEVICES:
      - device_name: leaf1.aristanetworks.com
        search_type: fqdn #[hostname | serialNumber | fqdn]
        cvp_configlets:
          - valid
          - invalid

  tasks:
    - name: validate module
      arista.cvp.cv_validate_v3:
        devices: "{{CVP_DEVICES}}"
        validate_mode: stop_on_error # | stop_on_warning | valid

Inputs

    
devices:
    description: CVP devices and configlet information.
    elements: dict
    required: true
    type: list

validate_mode:
    choices:
    - stop_on_error
    - stop_on_warning
    - ignore
    description: Indicate how cv_validate_v3 should behave on finding errors or warnings.
    required: true
    type: str