Skip to content

cv_task#

Execute or Cancel CVP Tasks.

Module added in version 2.9

Synopsis#

C l o u d V i s o n

P o r t a l

T a s k

m o d u l e

Module-specific Options#

The following options may be specified for this module:

parameter type required default choices comments
state
str no executed
  • executed
  • cancelled
action to carry out on the task executed - execute tasks cancelled - cancel tasks
tasks
list yes
CVP taskIDs to act on
wait
int no 0
Time to wait for tasks to transition to 'Completed'


Examples:#

---
- name: Execute all tasks registered in cvp_configlets variable
  arista.cvp.cv_task:
    tasks: "{{ cvp_configlets.data.tasks }}"

- name: Cancel a list of pending tasks
  arista.cvp.cv_task:
    tasks: "{{ cvp_configlets.data.tasks }}"
    state: cancelled

# 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:

- name: Execute all pending tasks and wait for completion for 60 seconds
  arista.cvp.cv_task:
    port: '{{cvp_port}}'
    tasks: "{{ tasks }}"
    wait: 60

Author#

  • EMEA AS Team (@aristanetworks)

Status#

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.