Deprecated

Removed in 4.0.0

i

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

arista.cvp.cv_task (3.10.1) — module

Execute or Cancel CVP Tasks.

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

CloudVision 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.
    required: false
    type: str

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

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