arista.cvp.cv_task (1.1.0) — module

Execute or Cancel CVP Tasks.

| "added in version" 2.9 of arista.cvp"

Authors: EMEA AS Team (@aristanetworks)

preview | supported by community

Install collection

Install with ansible-galaxy collection install arista.cvp:==1.1.0


Add to requirements.yml

  collections:
    - name: arista.cvp
      version: 1.1.0

Description

CloudVison Portal Task module

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Execute all tasks registered in cvp_configlets variable
  arista.cvp.cv_task:
    tasks: "{{ cvp_configlets.data.tasks }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Cancel a list of pending tasks
  arista.cvp.cv_task:
    tasks: "{{ cvp_configlets.data.tasks }}"
    state: cancelled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Execute all pending tasks and wait for completion for 60 seconds
# In order to get a list of all pending tasks, execute cv_facts first
- name: Update cvp facts
  arista.cvp.cv_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Execute all pending tasks and wait for completion for 60 seconds
  arista.cvp.cv_task:
    port: '{{cvp_port}}'
    tasks: "{{ tasks }}"
    wait: 60

Inputs

    
wait:
    default: 0
    description: Time to wait for tasks to transition to 'Completed'
    required: false
    type: int

state:
    choices:
    - executed
    - cancelled
    default: executed
    description: action to carry out on the task executed - execute tasks cancelled -
      cancel tasks
    required: false
    type: str

tasks:
    description: CVP taskIDs to act on
    required: true
    type: list