enfence.powerha_aix.pv_info (1.3.2) — module

find a suitable physical volume.

| "added in version" 1.2.0 of enfence.powerha_aix"

Authors: Andrey Klyachkin (@aklyachkin)

Install collection

Install with ansible-galaxy collection install enfence.powerha_aix:==1.3.2


Add to requirements.yml

  collections:
    - name: enfence.powerha_aix
      version: 1.3.2

Description

this module searches for physical volumes according to the supplied attributes.

if the volumes are found, a list with their names is returned.

otherwise an empty list is returned.

physical volumes already assigned to volume groups or locked by LVM are not returned.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get a list of disks with LDEV 60050768019081D398000000000010D4
- name: get hdisk for LDEV 60050768019081D398000000000010D4
  enfence.powerha_aix.pv_info:
    ldev: 60050768019081D398000000000010D4
  register: hdisk
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get a list of free disks, not assigned to volume groups
- name: get a list of free disks
  enfence.powerha_aix.pv_info:
    name: "hdisk*"
  register: free_hdisk
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# print the found hdisks
- name: print hdisk
  ansible.builtin.debug:
    var: free_hdisk.pv

Inputs

    
ldev:
    description:
    - LDEV or LUN ID of the physical volumes to return.
    - it can be a regular expresion.
    required: false
    type: str

name:
    description:
    - name to find a suitable physical volumes.
    - it can be a regular expresion.
    required: false
    type: str

pvid:
    description:
    - PVID of the physical volume to return.
    required: false
    type: str

uuid:
    description:
    - UUID of the physical volumes to return.
    required: false
    type: str

Outputs

changed:
  description: always False
  returned: always
  type: bool
msg:
  description: error and informational messages
  returned: always
  type: str
pv:
  description: a list of found physical volumes
  returned: always
  type: list
rc:
  description: return code of the last executed command
  returned: always
  type: int
stderr:
  description: standard error of the last executed command
  returned: always
  type: str
stdout:
  description: standard output of the last executed command
  returned: always
  type: str