pkubica.ovirt.ovirt_host_storage_info (1.4.3) — module

Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)

| "added in version" 1.0.0 of pkubica.ovirt"

Authors: Daniel Erez (@derez)

Install collection

Install with ansible-galaxy collection install pkubica.ovirt:==1.4.3


Add to requirements.yml

  collections:
    - name: pkubica.ovirt
      version: 1.4.3

Description

Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage).

This module was called C(ovirt_host_storage_facts) before Ansible 2.9, returning C(ansible_facts). Note that the M(pkubica.ovirt.ovirt_host_storage_info) module no longer returns C(ansible_facts)!


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:

# Gather information about HostStorages with specified target and address:
- pkubica.ovirt.ovirt_host_storage_info:
    host: myhost
    iscsi:
      target: iqn.2016-08-09.domain-01:nickname
      address: 10.34.63.204
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- ansible.builtin.debug:
    msg: "{{ result.ovirt_host_storages }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather information about all storages
  pkubica.ovirt.ovirt_host_storage_info:
    host: myhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather information about all iscsi storages
  pkubica.ovirt.ovirt_host_storage_info:
    host: myhost
    iscsi: {}
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather information about all fcp storages
  pkubica.ovirt.ovirt_host_storage_info:
    host: myhost
    fcp: {}

Inputs

    
fcp:
    description:
    - 'Dictionary with values for fibre channel storage type:'
    suboptions:
      address:
        description:
        - Address of the fibre channel storage server.
      lun_id:
        description:
        - LUN id.
      port:
        description:
        - Port of the fibre channel storage server.
    type: dict

auth:
    description:
    - 'Dictionary with values needed to create HTTP/HTTPS connection to oVirt:'
    required: true
    suboptions:
      ca_file:
        description:
        - A PEM file containing the trusted CA certificates.
        - The certificate presented by the server will be verified using these CA certificates.
        - If C(ca_file) parameter is not set, system wide CA certificate store is used.
        - Default value is set by C(OVIRT_CAFILE) environment variable.
        type: str
      compress:
        default: true
        description: Flag indicating if compression is used for connection.
        type: bool
      headers:
        description:
        - Dictionary of HTTP headers to be added to each API call.
        type: dict
      hostname:
        description:
        - A string containing the hostname of the server, usually something like `I(server.example.com)`.
        - Default value is set by C(OVIRT_HOSTNAME) environment variable.
        - Either C(url) or C(hostname) is required.
        type: str
      insecure:
        description:
        - A boolean flag that indicates if the server TLS certificate and host name should
          be checked.
        type: bool
      kerberos:
        description:
        - A boolean flag indicating if Kerberos authentication should be used instead
          of the default basic authentication.
        type: bool
      password:
        description:
        - The password of the user.
        - Default value is set by C(OVIRT_PASSWORD) environment variable.
        required: true
        type: str
      timeout:
        description: Number of seconds to wait for response.
        type: int
      token:
        description:
        - Token to be used instead of login with username/password.
        - Default value is set by C(OVIRT_TOKEN) environment variable.
        type: str
      url:
        description:
        - A string containing the API URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`.
        - Default value is set by C(OVIRT_URL) environment variable.
        - Either C(url) or C(hostname) is required.
        type: str
      username:
        description:
        - The name of the user, something like I(admin@internal).
        - Default value is set by C(OVIRT_USERNAME) environment variable.
        required: true
        type: str
    type: dict

host:
    description:
    - Host to get device list from.
    required: true
    type: str

iscsi:
    description:
    - 'Dictionary with values for iSCSI storage type:'
    suboptions:
      address:
        description:
        - Address of the iSCSI storage server.
      password:
        description:
        - A CHAP password for logging into a target.
      portal:
        description:
        - The portal being used to connect with iscsi.
      target:
        description:
        - The target IQN for the storage device.
      username:
        description:
        - A CHAP user name for logging into a target.
    type: dict

fetch_nested:
    description:
    - If I(yes) the module will fetch additional data from the API.
    - It will fetch only IDs of nested entity. It doesn't fetch multiple levels of nested
      attributes. Only the attributes of the current entity. User can configure to fetch
      other attributes of the nested entities by specifying C(nested_attributes).
    type: bool

nested_attributes:
    description:
    - Specifies list of the attributes which should be fetched from the API.
    - This parameter apply only when C(fetch_nested) is I(true).
    elements: str
    type: list

Outputs

ovirt_host_storages:
  description: 'List of dictionaries describing the HostStorage. HostStorage attributes
    are mapped to dictionary keys, all HostStorage attributes can be found at following
    url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host_storage.'
  returned: On success.
  type: list