Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.34 KB

File metadata and controls

51 lines (37 loc) · 1.34 KB

Tech Friday Ansible CVP Collection demo

About

Lorem Ipsum

Demo run:

Publish 2 configlets to CVP using arista.cvp collection

cvp_raw_configlets:
    CVP_RAW_DEMO_ADMIN_USERS: "{{lookup('file', 'configlets/ADMIN_USERS.conf')}}"
    CVP_RAW_DEMO_ALIASES: "{{lookup('file', 'configlets/ALIASES.conf')}}"
  • Playbook using arista.cvp.cv_configlet module
- name: 'create configlets on CVP {{inventory_hostname}}.'
    arista.cvp.cv_configlet:
    cvp_facts: "{{CVP_FACTS.ansible_facts}}"
    configlets: "{{cvp_raw_configlets}}"
    configlet_filter: ["{{ configlets_cvp_raw_prefix }}"]
    register: CONFIGLET_UPDATE

Publish configlets from a folder to Cloudvision

configlets_prefix_var: "CV_DEMO"
configlet_dir_var: "configlets/"
  • Use role in a playbook:
- name: 'upload configlets from cloudvision {{inventory_hostname}}'
    import_role:
      name: arista.avd.cvp_configlet_upload
    vars:
      configlet_directory: '{{ configlet_dir_var }}'
      configlets_cvp_prefix: '{{ configlets_prefix_var }}'