Replies: 5 comments 5 replies
-
Hi Rich, The existing However:
Coming back to your questions:
I've asked some questions internally around your questions and will come back to you as soon as possible. Jon. |
Beta Was this translation helpful? Give feedback.
-
Hi Rich, Assuming you have a dedicated group in the inventory for the L3 Leafs that have MLAG enabled, you could add the below to that groups' yaml file (example:
|
Beta Was this translation helpful? Give feedback.
-
i am getting errors when trying to push tags with deploy_cv to CVaaS avd 4.8
|
Beta Was this translation helpful? Give feedback.
-
So I have a current playbook that appears to achieve what I want from a setting the tags perspective ---
- name: Manage Arista EOS EVPN/VXLAN Configuration
hosts: FABRIC
connection: local
gather_facts: false
debugger: on_failed
collections:
- arista.avd
- arista.cvp
vars_files:
- "{{inventory_dir}}/secrets/vault.yml"
vars:
CVP_TAGS: []
tasks:
- name: Include Vault Vars to workaround bug
ansible.builtin.include_vars:
file: "{{inventory_dir}}/secrets/vault.yml"
tags: always
run_once: true
- name: generate intended variables
import_role:
name: arista.avd.eos_designs
- name: 'device_id'
set_fact:
device_id: "{{ switch.serial_number }}"
- name: Generate base device_tags vars
set_fact:
device_tags:
- name: "MLAG"
value: "{{ (switch.mlag_peer is defined) | string }}"
- name: "AVD_Type"
value: "{{ switch.type }}"
- name: Add Leaf_Pair to device_tags if hostname ends with 'a'
set_fact:
device_tags: "{{ device_tags + [{'name': 'Leaf_Pair', 'value': 'A'}] }}"
when: hostname[-1] == 'a'
- name: Add Leaf_Pair to device_tags if hostname ends with 'b'
set_fact:
device_tags: "{{ device_tags + [{'name': 'Leaf_Pair', 'value': 'B'}] }}"
when: hostname[-1] == 'b'
- name: Add metadata.cv_tags.device_tags to device_tags
set_fact:
device_tags: "{{ device_tags + hostvars[inventory_hostname]['metadata']['cv_tags']['device_tags'] }}"
when: hostvars[inventory_hostname]['metadata']['cv_tags']['device_tags'] is defined
- name: Build CVP_TAGS list
set_fact:
CVP_TAGS: "{{ CVP_TAGS + [{'device_id': hostvars[item]['device_id'], 'device_tags': hostvars[item]['device_tags']}] }}"
loop: "{{ groups['all'] }}"
when: hostvars[item]['device_tags'] is defined
run_once: true
delegate_to: localhost
delegate_facts: true
- name: Write CVP_TAGS to a file in the debug directory
ansible.builtin.copy:
content: "{{ hostvars['localhost']['CVP_TAGS'] | to_nice_yaml }}"
dest: "../debug/CVP_TAGS.yaml"
run_once: true
delegate_to: localhost
- name: Send Tags to server
hosts: cv_server
vars_prompt:
- name: cvp_pass
prompt: "Enter your CVP password ?"
tasks:
- name: get CVP_TAGS from hostvars.localhost.CVP_TAGS variable
ansible.builtin.set_fact:
CVP_TAGS: "{{ hostvars['localhost']['CVP_TAGS'] }}"
run_once: true
delegate_to: localhost
- name: "create tags"
arista.cvp.cv_tag_v3:
tags: "{{CVP_TAGS}}"
mode: assign
auto_create: true This is fine initially setting the tags. What I also need to do is make sure that mutually exclusive tags are not set to both. for example, if a switch was configured for MLAG, and has the |
Beta Was this translation helpful? Give feedback.
-
is cv_deploy ready for production use yet? |
Beta Was this translation helpful? Give feedback.
-
I am trying to configure AVD to set the topology tags automatically in CVP. I have configured in the fabric level yaml:
and I now see the tags in the intended structured config metadata for each device:
after running the build and provisioning playbooks, I do not see the tags on CVP either in Provisioning, Tags, System Tags, or in the Topology view. What am I missing?
I am also not clear how to set the custom tags on devices. Say I have a l3 switch pair configured in the DC1.yml l3leaf
I want to set three tags on this:
I thin use these tags in the upgrade template, and associated tasks.
The main questions I have is:
MLAG: true
tag based on the mlag variable in eos_design?structured_config
dict, but it seemed to have no effect.Beta Was this translation helpful? Give feedback.
All reactions