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

Unable to assign PPG to existing Azure VM using azure_rm_virtualmachine module #1298

Closed
fendisuyanto opened this issue Oct 23, 2023 · 2 comments · Fixed by #1329
Closed

Unable to assign PPG to existing Azure VM using azure_rm_virtualmachine module #1298

fendisuyanto opened this issue Oct 23, 2023 · 2 comments · Fixed by #1329
Labels
has_pr PR fixes have been made medium_priority Medium priority

Comments

@fendisuyanto
Copy link

SUMMARY

I try to assign an existing Azure VM to a PPG, but not able to find any documentation how to do it.
And the only module look like make sense is azure_rm_virtualmachine.
I didn't get any error when execute that, but it will not assign the PPG and no error

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure_rm_virtualmachine

ANSIBLE VERSION
ansible [core 2.12.2]
  python version = 3.8.12
  ninja version = 2.10.3
COLLECTION VERSION
# /home/user/.ansible/collections/ansible_collections
Collection.             Version
------------------ --------
azure.azcollecton 1.18.1

# /usr/share/ansible/collections/ansible_collections
Collection.             Version
------------------ --------
azure.azcollecton 1.16.0
CONFIGURATION
CALLBACKS_ENABLED(/home/user/.ansible.cfg) = ['timer','profile_tasks','profile_roles']
DEFAULT_FORKS(/home/user/.ansible.cfg) = 10
DEPRECATION_WARNINGS(env: ANSIBLE_DEPRECATION_WARNINGS) = False
HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False
OS / ENVIRONMENT

OS = RHEL 8.6
Azure VM

STEPS TO REPRODUCE

Update the VM using Ansible module azure_rm_virtualmachine

- name: Update PPG
   azure_rm_virtualmachine:
     resource_group: "{{ resource_group }}"
     name: "{{ azure_vm_name }}"
     proximity_placement_group: "{{ ppg_id }}"
   delegate_to: localhost
EXPECTED RESULTS

VM assign to PPG

ACTUAL RESULTS

Ansible result only show as OK
but nothing change on the VM when check from Azure portal on the VM or on the PPG


@Fred-sun
Copy link
Collaborator

@fendisuyanto azure_rm_virtualmachine.py support parameter "proximity_placement_group", the define as follow:

 162     proximity_placement_group:
 163         description:
 164             - The name or ID of the proximity placement group the VM should be associated with.
 165         type: dict
 166         suboptions:
 167             id:
 168                 description:
 169                     - The ID of the proximity placement group the VM should be associated with.
 170                 type: str
 171             name:
 172                 description:
 173                     - The Name of the proximity placement group the VM should be associated with.
 174                 type: str
 175             resource_group:
 176                 description:
 177                     - The resource group of the proximity placement group the VM should be associated with.
 178                 type: str

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Nov 10, 2023
@Fred-sun
Copy link
Collaborator

@fendisuyanto #1329 modified this parameter to support the update, but the virtual machine needs to be paused before the update. Thank you!

@Fred-sun Fred-sun added has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors labels Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants