Skip to content

Wrong handling of Booleans in vmware_guest #1379

Open
@AristonPost

Description

@AristonPost
SUMMARY

Possible wrong datatype handling

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware.vmware_guest

ANSIBLE VERSION
ansible [core 2.12.6]
  config file = None
  configured module search path = ['/home/patrick/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/patrick/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.13 (main, Jun  9 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)]
  jinja version = 3.1.2
  libyaml = True

COLLECTION VERSION
Collection       Version
---------------- -------
community.vmware 2.6.0
CONFIGURATION
OS / ENVIRONMENT

CentOS Stream Release 9

STEPS TO REPRODUCE
- name: Create virtual machine container
  community.vmware.vmware_guest:
    ...
    cluster: "{{ vsphere_target_cluster | default(omit) }}"
    esxi_hostname: "{{ vsphere_target_host | default(omit) }}"
    ...
EXPECTED RESULTS

Ignore cluster directive when not set by variable vsphere_target_cluster so either cluster or esxi_hostname can be provided

ACTUAL RESULTS
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unable to find cluster \"False\""}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue/PR relates to a bugneeds_triageNeeds a first human triage before being processed.python3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions