community.general.lxca_nodes module – Custom module for lxca nodes inventory utility

Note

This module is part of the community.general collection (version 7.5.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.lxca_nodes.

Synopsis

  • This module returns/displays a inventory details of nodes

Aliases: remote_management.lxca.lxca_nodes

Requirements

The below requirements are needed on the host that executes this module.

  • pylxca

Parameters

Parameter

Comments

auth_url

string / required

lxca https full web address

chassis

string

uuid of chassis, this is string with length greater than 16.

command_options

string

options to filter nodes information

Choices:

  • "nodes" ← (default)

  • "nodes_by_uuid"

  • "nodes_by_chassis_uuid"

  • "nodes_status_managed"

  • "nodes_status_unmanaged"

login_password

string / required

The password for use in HTTP basic authentication.

login_user

string / required

The username for use in HTTP basic authentication.

uuid

string

uuid of device, this is string with length greater than 16.

Attributes

Attribute

Support

Description

check_mode

Support: none

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

Examples

# 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

# 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

# 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

# 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

# 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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

result

dictionary

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"}]}

Authors

  • Naval Patel (@navalkp)

  • Prashant Bhosale (@prabhosa)