Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1992

vmware.vmware.cluster_info module's error message is unclear in case properties are not found

XMLWordPrintable

    • Low

      Description:

      vmware.vmware.cluster_info module's error message is unclear in case properties are not found

       

      Steps to reproduce:

          - name: Gather Cluster Info
            vmware.vmware.cluster_info:
              validate_certs: false
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              datacenter: "{{ vcenter_datacenter }}"
              port: "{{ vcenter_port }}"        
              schema: "vsphere"
              properties:
                - not_exist

       

      Expected result:

      fatal: [asavina]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Property 'not_exist' not found."}

       

      Actual result:

      fatal: [asavina]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "module_stderr": "<unknown>:1: SyntaxWarning: invalid escape sequence '\\['\n<unknown>:1: SyntaxWarning: invalid escape sequence '\\['\nTraceback (most recent call last):\n  File \"/tmp/ansible_vmware.vmware.cluster_info_payload_98gdi15g/ansible_vmware.vmware.cluster_info_payload.zip/ansible_collections/vmware/vmware/plugins/module_utils/_vmware_facts.py\", line 608, in vmware_obj_to_json\nAttributeError: 'vim.ClusterComputeResource' object has no attribute 'not_exist'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/asavina/.ansible/tmp/ansible-tmp-1731317753.047645-19051-76741414286151/AnsiballZ_cluster_info.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/asavina/.ansible/tmp/ansible-tmp-1731317753.047645-19051-76741414286151/AnsiballZ_cluster_info.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/asavina/.ansible/tmp/ansible-tmp-1731317753.047645-19051-76741414286151/AnsiballZ_cluster_info.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.vmware.vmware.plugins.modules.cluster_info', init_globals=dict(_module_fqn='ansible_collections.vmware.vmware.plugins.modules.cluster_info', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_vmware.vmware.cluster_info_payload_98gdi15g/ansible_vmware.vmware.cluster_info_payload.zip/ansible_collections/vmware/vmware/plugins/modules/cluster_info.py\", line 247, in <module>\n  File \"/tmp/ansible_vmware.vmware.cluster_info_payload_98gdi15g/ansible_vmware.vmware.cluster_info_payload.zip/ansible_collections/vmware/vmware/plugins/modules/cluster_info.py\", line 242, in main\n  File \"/tmp/ansible_vmware.vmware.cluster_info_payload_98gdi15g/ansible_vmware.vmware.cluster_info_payload.zip/ansible_collections/vmware/vmware/plugins/modules/cluster_info.py\", line 202, in gather_info_for_clusters\n  File \"/tmp/ansible_vmware.vmware.cluster_info_payload_98gdi15g/ansible_vmware.vmware.cluster_info_payload.zip/ansible_collections/vmware/vmware/plugins/module_utils/_vmware_facts.py\", line 617, in vmware_obj_to_json\nAttributeError: Property 'not_exist' not found.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

       

              rh-ee-mimorenc Mike Morency
              annsavina Anna Savina Frances
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: