Skip to content

Conversation

@Rogacz
Copy link

@Rogacz Rogacz commented Mar 5, 2025

SUMMARY

Added new state attribute with absent, disabled, enabled options to support missing functionality.
You can now remove existing DRS override or set DRS Override to disabled, which is different from manual.

Also added improvements:

  • Add name, uuid, moid, options to find VM in same standard as used in other modules, with optional folder, datacenter, use_instance_uuid arguments
  • Added alias vm_name to name argument to keep backward compatibility
  • Actually support check_mode as it was ignored previously
  • Properly handle editing and removal of existing DRS override entry
  • Expand description
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_drs_override

ADDITIONAL INFORMATION

At work, I need to create and remove DRS override for VMs, so here is an improved version of the module.

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/150ee2f3859d4fa59078586284c5d5d6

⚠️ ansible-tox-linters CANCELED
build-ansible-collection FAILURE in 4m 39s
⚠️ ansible-test-cloud-integration-vcenter7_only-stable218 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ ansible-test-cloud-integration-vcenter7_2esxi-stable218 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ ansible-test-cloud-integration-vcenter7_1esxi-stable218_1_of_2 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ ansible-test-cloud-integration-vcenter7_1esxi-stable218_2_of_2 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection

@softwarefactory-project-zuul
Copy link

@Rogacz Rogacz force-pushed the drs_override_enchance branch from ef27490 to 31e30eb Compare April 28, 2025 10:59
Copy link
Collaborator

@ihumster ihumster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little embarrassed by the presence of absent without present - I would add for compatibility and logic present with the same logic as enabled

@Rogacz
Copy link
Author

Rogacz commented Apr 28, 2025

I can just rename enabled to present. Options would be present/absent/disabled
My thought process was that both disabled and enabled are present, and didn't want to separate it to state=absent/present and enabled=true/false options.
But I understand it breaks a convention.

@softwarefactory-project-zuul
Copy link

@Rogacz
Copy link
Author

Rogacz commented Apr 29, 2025

I've noticed that tests were skipped

@Rogacz
Copy link
Author

Rogacz commented Apr 29, 2025

It fails on something unrelated to this PR.
On content library tasks: The provided storage backing rw_datastore for library cfea863b-8db1-4b5f-a54d-8cfe64b9c9ed is inaccessible

@Rogacz
Copy link
Author

Rogacz commented Apr 30, 2025

recheck

@mariolenz
Copy link
Collaborator

I'm sorry, but my priority ATM is to make the collection work with the upcoming ansible-core 2.19 release (#2388 and #2391).

It turns out that this is harder than I originally expected. Please bear wit me 🙏

@Rogacz
Copy link
Author

Rogacz commented Jul 17, 2025

recheck

@softwarefactory-project-zuul
Copy link

Rogacz added 7 commits July 17, 2025 13:56
Add absent option, Switch to find vm based on standard options, Actually support check_mode
separate state argument with new disabled option, improve description
@softwarefactory-project-zuul
Copy link

@Rogacz Rogacz force-pushed the drs_override_enchance branch from e9ebce9 to bfbb8a2 Compare July 17, 2025 15:11
@Rogacz
Copy link
Author

Rogacz commented Sep 10, 2025

recheck

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/05f12dba743d45d49135725a57807699

✔️ ansible-tox-linters SUCCESS in 5m 06s
ansible-galaxy-importer FAILURE in 3m 47s (non-voting)
✔️ build-ansible-collection SUCCESS in 6m 38s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants