-
Notifications
You must be signed in to change notification settings - Fork 338
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
vmware_drs_group - Add VM to DRS Group #81
Comments
For the record: vmware_drs_group does not update group - it overwrites |
Hi |
What would be the proper way to resolve this issue? |
I would prefer a single module with three different methods. Set, add, remove Set method should be the current behavior. |
Maybe we should do the following: So the states are alligned to the Ansible convention. I also think that current plays which use any kind of workaround will be not affected by this change. |
This would break the current behavior of the module... never a good idea. Anyway, you missed a use case: If we provide a way to add a VM to a DRS group, we also should provide a way to remove a VM. I think it would be better to leave I think it would be better to add states like:
Is there some explicit convention / best practice for states? I wasn't able to find one. But maybe I was just too stupid to find it or there's some implicit convention I don't know about.
All playbooks that use the module as it's meant to be used will break! Let's pretend someone defines a DRS group with vm1, vm2 and vm3. Then they decide that they only want to have vm1 and vm2 in this group. At the moment, the DRS group won't contain vm3 any more; with your solution, it would: vm1 and vm2 are added to this DRS group (no change, they are already part of it) but vm3 won't be removed. So (and this is really problematic) your solution breaks existing playbooks. |
@mariolenz You are absolutely right, thanks for pointing it out. I missed these cases and forgot how this module is intended to work. Maybe it would be better to create a new module, as already suggested by @mycloudrevolution called something like |
I fully agree with @mariolenz point to make sure not to break existing playbooks with a new module version. I also see the need for the four types of behavior: Create Group (with a list of VMs), remove group add VM, remove VM. If the dedicated modules for Group and VM operations are created (which is likely), I would like to see that a specific workflow is possible without much fuss:
|
@mycloudrevolution I totally see the use case for the workflow you mentioned, but we do have a problem. We can create a group with vmware_drs_group and add members to a group with the new module vmware_drs_group_member. So a play with the mentioned workflow will look like this:
But the problem is, vmware_drs_group requires either the parameter I do not know your exact use case, but if you already know that you have to create a group because it does not exist yet you can use the current module vmware_drs_group and provide the group member. If you just want to add a newly provisioned vm to an existing group, use the new module. You can also check if the group already exists using the module vmware_drs_group_facts and check if it contains the group. If not, the group must be created first. Another option would be to 'simply' change the behaviour of the module vmware_drs_group to not have I know, it is getting complex, but we should make the workflow as simple as possible and do not break existing playbooks. What do you think about that? Do I missed something and there may be a simpler solution? |
For my opinion the new modules should work like that:
|
@vMarkusK: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this issue with this template: |
Hi. Are there any plans to look at this issue? Thanks. |
Another call for this to be looked at? The introduction of vmware_drs_group_member to add VMs to an already existing DRS Group would be great. |
Sadly I am only able to test and verify. My Python skills are not on a level that makes the development possible. |
Added new parameter 'operation' to manage existing members in the existing DRS group. Users can now add, set, and remove existing members in DRS Group fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
@vMarkusK @danielmhi @richardlock @alexsuppanz |
resolved_by_pr #512 |
@Akasurde will test when i can, thx |
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
I added a new module to manage VMs/Hosts in DRS group - |
resolved_by_pr #512 |
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Fixes: ansible-collections#81 Signed-off-by: Abhijeet Kasurde <[email protected]>
Currently only a new Group von be created or overwritten. If you want to add a single VM, a workarounds needs to be applied.
This is verry complex and not pretty stable.
The text was updated successfully, but these errors were encountered: