Skip to content

cv\_task

cv_task

Execute or Cancel CVP Tasks.

Synopsis

CloudVison Portal Task module

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)


Last update: May 8, 2021


Back to top