Closed Jacob-Steele closed 2 months ago
As a note to others with the same problem, we can workaround this by using azure_rm_resource
, but it's not ideal.
e.g.
- name: Get VMSS State
azure_rm_resource:
resource_group: "{{ resource_group }}"
provider: compute
resource_type: virtualMachineScaleSets
resource_name: "{{ scale_set_name }}"
api_version: "2023-09-01"
method: "GET"
register: vmss_api_response
- name: Update VMSS Tags
azure_rm_resource:
resource_group: "{{ resource_group }}"
provider: compute
resource_type: virtualMachineScaleSets
resource_name: "{{ scale_set_name }}"
api_version: "2023-09-01"
method: "PATCH"
body: "{{ vmss_api_response.response | combine({'tags': scale_set_tags}) }}"
@Jacob-Steele Fixed in #1654
@Jacob-Steele Fixed in #1654
Thank you so much @Fred-sun for the fast turn around on this 🎉
SUMMARY
When using module
azure_rm_virtualmachinescaleset
and specifyingtags:
, tags on the VMSS are not updated.ISSUE TYPE
COMPONENT NAME
azure_rm_virtualmachinescaleset
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
We have a role that's running the
azure_rm_virtualmachinescaleset
module to update a VMSS that already exists on Azure. I have one tag associated with this VMSS calledtest:blarg
mainly to figure out if this is working.EXPECTED RESULTS
Tags on the VMSS are updated to be
ACTUAL RESULTS
Tags are not updated on the VMSS
As shown in the below output, it picks up the original tag under
ansible_facts
ofit also picks up the new tags under
invocation
ofBut the VMSS isn't actually updated. I can keep running this role with the exact same parameters, and the VMSS will always be
changed
, but the tags are never updated.