Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

LAB 06 - Manage device on CloudVision

About

Manage configlets attached to a device

Execute lab

1. Review configlet vars

# Go to lab06 directory
$ cd ../lab06-cv-device
# Check variables before running playbook
$ cat group_vars/CVP.yml

---
CVP_DEVICES:
  leaf1:
    name: 'leaf1'
    parentContainerName: Leaf
    configlets:
        - 'Leaf1-BGP-Lab'
        - 'BaseIPv4_Leaf1'
    imageBundle: []  # Not yet supported

2. Attach configlet Leaf1-BGP-LAB to leaf1 device

# Run playbook to attach the configlet to Leaf1
$ ansible-playbook playbook.device.yml

Check on CloudVision: https://{{cvp_address}}/cv/provisioning

3. Optional: Create new configlets and attach them to leaf1

# Create new configlet to attach to Leaf1
$ vi group_vars/CVP.yml
---
CVP_CONFIGLETS:
  01TRAINING-alias: "alias a{{ 999 | random }} show version"
  01TRAINING-01: "alias a{{ 999 | random }} show version"

CVP_DEVICES:
  leaf1:
    name: 'leaf1'
    parentContainerName: Leaf
    configlets:
        - 'Leaf1-BGP-Lab'
        - 'BaseIPv4_Leaf1'
        - '01TRAINING-01'
    imageBundle: []  # Not yet supported
# If 01TRAINING-01 configlet is not present on CVP, the playbook will fail with the following message:
"msg": "leaf1 device has unknown configlets from CV: ['01TRAINING-01']"
# If not present, modify the playbook to push the configlet before applying it to the device. Do not forget to
# collect CVP facts.
# Be careful with the YAML indentation
$ vi ansible-playbook playbook.device.yml

# Run playbook again to attach the newly created configlet to Leaf1
$ ansible-playbook playbook.device.yml

Check on CloudVision: https://{{cvp_address}}/cv/provisioning