Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conditionals to eos_config_deploy_cvp v3 tasks #5130

Open
1 task done
joshkingsbury opened this issue Mar 4, 2025 · 0 comments
Open
1 task done

Add conditionals to eos_config_deploy_cvp v3 tasks #5130

joshkingsbury opened this issue Mar 4, 2025 · 0 comments
Labels
type: enhancement New feature or request

Comments

@joshkingsbury
Copy link

joshkingsbury commented Mar 4, 2025

Enhancement summary

There are conditionals for some tasks within the eos_config_deploy_cvp v3 role allowing for bool vars to be set on the calling playbook that imports the role. These don't cover all available tasks and restricts the ability to more granularly customise the tasks executed without forking the role.

We currently fork this process today and would be good for this to be added upstream. Specifically conditionals are missing for:

name: "Create configlets on CVP {{ inventory_hostname }}."
name: "Building Containers topology on {{ inventory_hostname }}"
name: "Configure devices on {{ inventory_hostname }}"

Which component of AVD is impacted

eos_config_deploy_cvp

Use case example

Add additional bool variables to support conditional execution of tasks based on the calling playbook in a similar way to avd_eos_config_deploy_cvp_execute_configlet_tasks

For example, add an option to apply a false value (default true) to avd_eos_config_deploy_cvp_build_container to control execution of v3 task name: "Building Containers topology on {{ inventory_hostname }}"

- name: Deploy Configs
  hosts: CVP
  gather_facts: false
  tasks:
    - name: Run CVP provisioning
      ansible.builtin.import_role:
          name: eos_config_deploy_cvp
      vars:
        avd_eos_config_deploy_cvp_build_container: false

Ideally a bool var is defined individually for each of the 3 tasks missing current conditionals:

name: "Create configlets on CVP {{ inventory_hostname }}."
name: "Building Containers topology on {{ inventory_hostname }}"
name: "Configure devices on {{ inventory_hostname }}"

Describe the solution you would like

As an example:

- name: "Building Containers topology on {{ inventory_hostname }}"
  arista.cvp.cv_container_v3:
    topology: "{{ cvp_containers }}"
    state: present
    apply_mode: "{{ container_apply_mode }}"
  register: cvp_container_results
  when:
    - avd_eos_config_deploy_cvp_build_container | arista.avd.default(true)

Describe alternatives you have considered

Development efforts should be made to cv_deploy role but this, for me, is a small easy QOL improvement to bridge the gap until I can transition to the cv_deploy role within our playbooks.

Additional context

No response

Contributing Guide

  • I agree to follow this project's Code of Conduct
@joshkingsbury joshkingsbury added the type: enhancement New feature or request label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant