You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the vmware_guest module, the customization.autologoncount is not set to 0 when customization.autologon is set to false:
Error received:
TypeError: Required field "autoLogonCount" not provided (not @optional)
Per documentation in vmware_guest.py:
autologon:
type: bool
description:
- Auto logon after virtual machine customization.
- Specific to Windows customization.
autologoncount:
type: int
description:
- Number of autologon after reboot.
- Specific to Windows customization.
- Ignored if O(customization.autologon) is unset or set to O(customization.autologon=false).
- If unset, 1 will be used.
Only see logic that handles unset customization.autologon which defaults to 1, as described.
Prior to the reported issue, the build would run with no issues and the autologoncount was not required.
ACTUAL RESULTS
Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1720797044.2639995-59-249635465181726/AnsiballZ_vmware_guest.py\", line 107, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1720797044.2639995-59-249635465181726/AnsiballZ_vmware_guest.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1720797044.2639995-59-249635465181726/AnsiballZ_vmware_guest.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_guest', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_guest', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.9/runpy.py\", line 225, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_vmware_guest_payload_949rk4a_/ansible_vmware_guest_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest.py\", line 3646, in <module>\n File \"/tmp/ansible_vmware_guest_payload_949rk4a_/ansible_vmware_guest_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest.py\", line 3635, in main\n File \"/tmp/ansible_vmware_guest_payload_949rk4a_/ansible_vmware_guest_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest.py\", line 3041, in deploy_vm\n File \"/tmp/ansible_vmware_guest_payload_949rk4a_/ansible_vmware_guest_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest.py\", line 2353, in customize_vm\n File \"/usr/local/lib/python3.9/site-packages/pyVmomi/VmomiSupport.py\", line 663, in __setattr__\n CheckField(self._GetPropertyInfo(name), val)\n File \"/usr/local/lib/python3.9/site-packages/pyVmomi/VmomiSupport.py\", line 1041, in CheckField\n raise TypeError('Required field \"%s\" not provided (not @optional)' % info.name)\nTypeError: Required field \"autoLogonCount\" not provided (not @optional)\n
The text was updated successfully, but these errors were encountered:
SUMMARY
Under the vmware_guest module, the customization.autologoncount is not set to 0 when customization.autologon is set to false:
Error received:
Per documentation in vmware_guest.py:
Only see logic that handles unset customization.autologon which defaults to 1, as described.
ISSUE TYPE
COMPONENT NAME
vmware_guest.py
ANSIBLE VERSION
COLLECTION VERSION
Also tested on:
CONFIGURATION
STEPS TO REPRODUCE
Set autologon to False and omit autologoncount if present
EXPECTED RESULTS
Prior to the reported issue, the build would run with no issues and the autologoncount was not required.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: