Skip to content

Bug(cv_tags_v3): Tags module errors if the device isn't in the inventory #718

Open
@colinmacgiolla

Description

@colinmacgiolla

Issue Summary

Other modules have the concept of a loose or strict inventory_mode to allow missing devices to be ignored. But the tags module does not, so we error when trying to tag devices that are not yet deployed e.g.

fatal: [XXX]: FAILED! => {"changed": false, "msg": "Error, Device leaf-1a doesn't exists on CV. Check the hostname/fqdn"}

I'd expect that the cv_tags_v3 behave similarly to the other modules, and allow missing devices to be ignored.

Which component(s) of AVD impacted

cv_tag_v3

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Input variables

vars:
   CVP_TAGS:
      - device: NOT_EXISTNG
        device_tags:
          - name: topology_hint_datacenter
            value: DC_ALPHA
          - name: topology_hint_type
            value: leaf
          - name: topology_hint_pod
            value: POD_C
          - name: topology_hint_rack
            value: 20

Steps to reproduce

Try to tag a device that doesn't yet exist

Relevant log output

fatal: [XXX]: FAILED! => {"changed": false, "msg": "Error, Device leaf-1a doesn't exists on CV. Check the hostname/fqdn"}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions