Skip to content

Instantly share code, notes, and snippets.

@titom73
Created May 3, 2021 10:14
Show Gist options
  • Save titom73/4aab2ebfe0694d0262038101d7d24a40 to your computer and use it in GitHub Desktop.
Save titom73/4aab2ebfe0694d0262038101d7d24a40 to your computer and use it in GitHub Desktop.
Deploy Arista EOS with CV v3 modules
- name: Cloudvision v3 test playbook
hosts: cv_server
connection: local
gather_facts: false
collections:
- arista.avd
- arista.cvp
vars:
execute_tasks: true
CVP_DEVICES:
- fqdn: CV-ANSIBLE-EOS01
parentContainerName: 'POD01'
configlets:
- 'CV-ANSIBLE-EOS01-CONFIG'
CVP_CONTAINERS:
DC2:
parentContainerName: Tenant
Leafs:
parentContainerName: DC2
POD01:
parentContainerName: Leafs
CVP_CONFIGLETS:
CV-ANSIBLE-EOS01-CONFIG: "{{lookup('file', './configlet.txt')}}"
tasks:
- name: "Create & update configlet"
arista.cvp.cv_configlet_v3:
configlets: "{{CVP_CONFIGLETS}}"
state: present
- name: "Configure containers"
arista.cvp.cv_container_v3:
topology: "{{CVP_CONTAINERS}}"
state: present
apply_mode: loose
- name: "Configure devices on {{inventory_hostname}}"
arista.cvp.cv_device_v3:
devices: "{{CVP_DEVICES}}"
apply_mode: strict
register: CVP_DEVICES_RESULTS
- name: Execute generated tasks
arista.cvp.cv_task_v3:
tasks: "{{ CVP_DEVICES_RESULTS.taskIds }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment