community.vmware.vmware_host_iscsi_info (4.2.0) — module

Gather iSCSI configuration information of ESXi host

Authors: sky-joker (@sky-joker)

Install collection

Install with ansible-galaxy collection install community.vmware:==4.2.0


Add to requirements.yml

  collections:
    - name: community.vmware
      version: 4.2.0

Description

This module can be used to gather information about the iSCSI configuration of the ESXi host.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather iSCSI configuration information of ESXi host
  community.vmware.vmware_host_iscsi_info:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    esxi_hostname: "{{ esxi_hostname }}"
  register: iscsi_info

Inputs

    
port:
    default: 443
    description:
    - The port number of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PORT)
      will be used instead.
    type: int

hostname:
    description:
    - The hostname or IP address of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_HOST)
      will be used instead.
    type: str

password:
    aliases:
    - pass
    - pwd
    description:
    - The password of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PASSWORD)
      will be used instead.
    type: str

username:
    aliases:
    - admin
    - user
    description:
    - The username of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_USER)
      will be used instead.
    type: str

proxy_host:
    description:
    - Address of a proxy that will receive all HTTPS requests and relay them.
    - The format is a hostname or a IP.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PROXY_HOST)
      will be used instead.
    required: false
    type: str

proxy_port:
    description:
    - Port of the HTTP proxy that will receive all HTTPS requests and relay them.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PROXY_PORT)
      will be used instead.
    required: false
    type: int

esxi_hostname:
    description:
    - The ESXi hostname on which to gather iSCSI settings.
    required: true
    type: str

validate_certs:
    default: true
    description:
    - Allows connection when SSL certificates are not valid. Set to V(false) when certificates
      are not trusted.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_VALIDATE_CERTS)
      will be used instead.
    type: bool

Outputs

detected_iscsi_drives:
  description:
  - list of detected iSCSI drive
  returned: always
  sample: "[\n    {\n        \"address\": [\n            \"192.168.0.57:3260\"\n \
    \       ],\n        \"canonical_name\": \"naa.60014055f198fb3d0cb4bd7ae1f802e1\"\
    ,\n        \"iscsi_name\": \"iqn.2021-03.local.iscsi-target:iscsi-storage.target0\"\
    \n    }\n]"
  type: list
iscsi_properties:
  description: dictionary of current iSCSI information
  returned: always
  sample: "{\n  \"iscsi_alias\": \"\",\n  \"iscsi_authentication_properties\": {\n\
    \    \"_vimtype\": \"vim.host.InternetScsiHba.AuthenticationProperties\",\n  \
    \  \"chapAuthEnabled\": false,\n    \"chapAuthenticationType\": \"chapProhibited\"\
    ,\n    \"chapInherited\": null,\n    \"chapName\": \"\",\n    \"chapSecret\":\
    \ \"XXXXXXXXX\",\n    \"mutualChapAuthenticationType\": \"chapProhibited\",\n\
    \    \"mutualChapInherited\": null,\n    \"mutualChapName\": \"\",\n    \"mutualChapSecret\"\
    : \"XXXXXXXXX\"\n  },\n  \"iscsi_enabled\": true,\n  \"iscsi_name\": \"iqn.1998-01.com.vmware:esxi-033f58ee\"\
    ,\n  \"iscsi_send_targets\": [\n    {\n      \"address\": \"192.168.0.1\",\n \
    \     \"authenticationProperties\": {\n        \"_vimtype\": \"vim.host.InternetScsiHba.AuthenticationProperties\"\
    ,\n        \"chapAuthEnabled\": false,\n        \"chapAuthenticationType\": \"\
    chapProhibited\",\n        \"chapInherited\": true,\n        \"chapName\": \"\"\
    ,\n        \"chapSecret\": \"XXXXXXXXX\",\n        \"mutualChapAuthenticationType\"\
    : \"chapProhibited\",\n        \"mutualChapInherited\": true,\n        \"mutualChapName\"\
    : \"\",\n        \"mutualChapSecret\": \"XXXXXXXXX\"\n      },\n      \"port\"\
    : 3260\n    }\n  ],\n  \"iscsi_static_targets\": [\n    {\n      \"address\":\
    \ \"192.168.0.1\",\n      \"authenticationProperties\": {\n        \"_vimtype\"\
    : \"vim.host.InternetScsiHba.AuthenticationProperties\",\n        \"chapAuthEnabled\"\
    : false,\n        \"chapAuthenticationType\": \"chapProhibited\",\n        \"\
    chapInherited\": true,\n        \"chapName\": \"\",\n        \"chapSecret\": \"\
    XXXXXXXXX\",\n        \"mutualChapAuthenticationType\": \"chapProhibited\",\n\
    \        \"mutualChapInherited\": true,\n        \"mutualChapName\": \"\",\n \
    \       \"mutualChapSecret\": \"XXXXXXXXX\"\n      },\n      \"iscsi_name\": \"\
    iqn.2004-04.com.qnap:tvs-673:iscsi.vm3.2c580e\",\n      \"port\": 3260\n    }\n\
    \  ],\n  \"port_bind\": [],\n  \"vmhba_name\": \"vmhba65\"\n}"
  type: dict