aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
251 stars 187 forks source link

Bug(cvp_configlet_upload): v1/v3 tasks not triggered when playbook is executed with explicit --tags #4081

Open alexeygorbunov opened 3 weeks ago

alexeygorbunov commented 3 weeks ago

Issue Summary

When playbook targeting arista.avd.cvp_configlet_upload is engaged using `--tags' (like 'apply', 'provision') - 'Execute upload with collection in version {{ cv_collection }}' task from main.yml must be always triggered.

Which component(s) of AVD impacted

cvp_configlet_upload

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Steps to reproduce

Playbook:

- name: Build Configurations and Documentation
  hosts: CLOUD_VISION_SERVERS
  connection: local
  gather_facts: false

  tasks:

    - name: Upload cvp configlets
      ansible.builtin.import_role:
          name: arista.avd.cvp_configlet_upload
      vars:
        configlet_directory: 'configlets/'
        file_extension: 'txt'
        configlets_cvp_prefix: 'DC1-AVD'
        execute_tasks: false
        cv_collection: v3

Execution:

# ansible-playbook -i inventory.yml -i ../cvp_inventory.yml  playbooks/<PLAYBOOK_NAME>.yml -e @../vault.yml --ask-vault-pass --tags provision

### Relevant log output

```shell
Result:

Vault password: 

PLAY [Build Configurations and Documentation] *******************************************************************************************************************************************************************************************************

TASK [arista.avd.cvp_configlet_upload : Verify Requirements] ****************************************************************************************************************************************************************************************
AVD version v1.0.1-3788-ge38b3da98
Use -v for details.
ok: [cvp_onprem_lab -> localhost]

TASK [arista.avd.cvp_configlet_upload : Generate intended variables] ********************************************************************************************************************************************************************************
ok: [cvp_onprem_lab]

PLAY RECAP ******************************************************************************************************************************************************************************************************************************************
cvp_onprem_lab         : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

#


### Contributing Guide

- [X] I agree to follow this project's Code of Conduct