-
Notifications
You must be signed in to change notification settings - Fork 341
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
Add a new module vmware_guest_tpm #1075
Conversation
recheck |
1 similar comment
recheck |
Hi @Akasurde @goneri @mariolenz @sky-joker would you please help reviewing this merge request? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this new module @Tomorrow9! I wasn't able to test this yet but the code LGTM so far.
However, I really like check mode. Could you please implement this? It's really great to test changes to a playbook in a production environment by running it in check mode.
It would be great to have a test case for this, but I don't think this is really possible at the moment since we would need a key provider. I think the current vCSA comes with an embedded KMIP server, maybe we can make use of this in the long run. That's just an idea, nothing to be implemented in this PR.
Hi @Tomorrow9, thank you for the PR. Is it possible to test this PR with our CI? Does this module require some special hardware? |
Nope. But vTMP needs a key server afaik. vSphere 7.0U2 vCenter comes with a Native Key Provider that we could use for a test. The question is: Should we set up the key provider in the test case or in the CI pipeline itself? I'd prefer to have this native key provider enabled in the test environment created by zuul. You see, there are several features that need a key server to work and it would be easier to write tests if the CI provided environment includes one. |
@goneri @mariolenz yeah, there required a key provider on vCenter configured firstly, then users can add vTPM to the VM. So I'll create a new module to support creating new Standard key provider and Native key provider on vCenter later. With this module the whole process can be automated. Thanks for reviewing this. |
Thank @Tomorrow9 for making the new module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed the module works well in my environment.
All that is left is that could you please add check mode processing as @mariolenz says?
After that, I'll add LGTM to the comment :)
I think we are running 7.0U2 in the CI: ansible-network/windmill-config#887 I'm not sure about the ESXi version we're using (maybe @goneri can tell us) but as far as I can see the vCSA version is important here. The ESXi hosts shouldn't mind if it's an external KMIP server or the native key provider as far as I understand. |
vmware: Add vTPM information to facts data SUMMARY This PR will add vTPM information to default gather information for a virtual machine. ref: #1075 ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/module_utils/vmware.py changelogs/fragments/1082_vmware.yml ADDITIONAL INFORMATION tested on vCenter/ESXi 6.7 and 7.0 RETURN VALUE EXAMPLE If vTPM is enabled "tpm_info": { "provider_id": "HyTrust KMS", "tpm_present": true }, If vTPM isn't enabled "tpm_info": { "provider_id": null, "tpm_present": false }, Reviewed-by: Mario Lenz <[email protected]> Reviewed-by: None <None>
Thanks for testing and reviewing this. @sky-joker @mariolenz check mode is added, please review it. Thanks. |
Signed-off-by: dianew <[email protected]>
Signed-off-by: dianew <[email protected]>
Signed-off-by: dianew <[email protected]>
Signed-off-by: dianew <[email protected]>
Signed-off-by: dianew <[email protected]>
Signed-off-by: dianew <[email protected]>
In check mode:
|
Not in check mode:
If VM not in power off state:
If not connect to vCenter:
|
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing check mode, LGTM now!
@sky-joker Could you please review again, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @Tomorrow9 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SUMMARY
Add a new module for adding or removing vTPM device to VM.
Fixes #1053
ISSUE TYPE
COMPONENT NAME
vmware_guest_tpm
ADDITIONAL INFORMATION