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

vmware_guest: change fail to fail_json function #1402

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vmware_guest - Fix no fail attribute issue (https://github.com/ansible-collections/community.vmware/issues/1401).
6 changes: 3 additions & 3 deletions plugins/modules/vmware_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3373,13 +3373,13 @@ def main():
# Check requirements for virtualization based security
if pyv.params['hardware']['virt_based_security']:
if not pyv.params['hardware']['nested_virt']:
pyv.module.fail("Virtualization based security requires nested virtualization. Please enable nested_virt.")
pyv.module.fail_json(msg="Virtualization based security requires nested virtualization. Please enable nested_virt.")

if not pyv.params['hardware']['secure_boot']:
pyv.module.fail("Virtualization based security requires (U)EFI secure boot. Please enable secure_boot.")
pyv.module.fail_json(msg="Virtualization based security requires (U)EFI secure boot. Please enable secure_boot.")

if not pyv.params['hardware']['iommu']:
pyv.module.fail("Virtualization based security requires I/O MMU. Please enable iommu.")
pyv.module.fail_json(msg="Virtualization based security requires I/O MMU. Please enable iommu.")

# Check if the VM exists before continuing
vm = pyv.get_vm()
Expand Down