aristanetworks / ansible-cvp

Ansible modules for Arista CloudVision
http://cvp.avd.sh
Apache License 2.0
66 stars 61 forks source link

Allow tag assignment to serial numbers #558

Closed sebastianw closed 1 year ago

sebastianw commented 1 year ago

Enhancement summary

Right now you can only assign tags to hostnames. It should also be possible to assign them to serial-numbers.

Which component of AVD is impacted

cv_tag_v3

Use case example

- hosts: cvp_servers
  run_once: true
  tasks:
    - name: Assign Tags
      arista.cvp.cv_tag_v3:
        tags: "{{tags_assign}}"
        mode: assign
        auto_create: True
      vars:
        tags_assign:
          - device_id: SGDXXXXXXXX
            device_tags:
              - name: tag1
                value: value1

Describe the solution you'd like

A field to assign tags by device serial numbers. As I understand the API already supports this.

Describe alternatives you've considered

Continue using hostnames, but as these names are mutable there might be a chance for false assignments or failed assignments. Serial numbers don't change.

Additional context

No response

Code of Conduct