community.general.lxca_nodes (8.5.0) — module

Custom module for lxca nodes inventory utility

Authors: Naval Patel (@navalkp), Prashant Bhosale (@prabhosa)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module returns/displays a inventory details of nodes


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get all nodes info
- name: Get nodes data from LXCA
  community.general.lxca_nodes:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    command_options: nodes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get specific nodes info by uuid
- name: Get nodes data from LXCA
  community.general.lxca_nodes:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    uuid: "3C737AA5E31640CE949B10C129A8B01F"
    command_options: nodes_by_uuid
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get specific nodes info by chassis uuid
- name: Get nodes data from LXCA
  community.general.lxca_nodes:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    chassis: "3C737AA5E31640CE949B10C129A8B01F"
    command_options: nodes_by_chassis_uuid
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get managed nodes
- name: Get nodes data from LXCA
  community.general.lxca_nodes:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    command_options: nodes_status_managed
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# get unmanaged nodes
- name: Get nodes data from LXCA
  community.general.lxca_nodes:
    login_user: USERID
    login_password: Password
    auth_url: "https://10.243.15.168"
    command_options: nodes_status_unmanaged

Inputs

    
uuid:
    description: uuid of device, this is string with length greater than 16.
    type: str

chassis:
    description: uuid of chassis, this is string with length greater than 16.
    type: str

auth_url:
    description:
    - lxca HTTPS full web address.
    required: true
    type: str

login_user:
    description:
    - The username for use in HTTP basic authentication.
    required: true
    type: str

login_password:
    description:
    - The password for use in HTTP basic authentication.
    required: true
    type: str

command_options:
    choices:
    - nodes
    - nodes_by_uuid
    - nodes_by_chassis_uuid
    - nodes_status_managed
    - nodes_status_unmanaged
    default: nodes
    description: options to filter nodes information
    type: str

Outputs

result:
  description: nodes detail from lxca
  returned: always
  sample:
    nodeList:
    - machineType: '6241'
      model: AC1
      type: Rack-TowerServer
      uuid: 118D2C88C8FD11E4947B6EAE8B4BDCDF
    - machineType: '8871'
      model: AC1
      type: Rack-TowerServer
      uuid: 223D2C88C8FD11E4947B6EAE8B4BDCDF
  type: dict