lxca_nodes – Custom module for lxca nodes inventory utility

From Get docs
Ansible/docs/2.8/modules/lxca nodes module


lxca_nodes – Custom module for lxca nodes inventory utility

New in version 2.8.


Synopsis

  • This module returns/displays a inventory details of nodes

Requirements

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

  • pylxca

Parameters

Parameter Choices/Defaults Comments

auth_url

string / required

lxca https full web address

chassis

-

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

command_options

-

  • nodes

  • nodes_by_uuid
  • nodes_by_chassis_uuid
  • nodes_status_managed
  • nodes_status_unmanaged

options to filter nodes information

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

-

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



Notes

Note


Examples

# get all nodes info
- name: get nodes data from LXCA
  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
  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
  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
  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
  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 Returned Description

result

dictionary

always

nodes detail from lxca


Sample:

{'nodeList': [{'machineType': '6241', 'model': 'AC1', 'type': 'Rack-TowerServer', 'uuid': '118D2C88C8FD11E4947B6EAE8B4BDCDF'}, {'machineType': '8871', 'model': 'AC1', 'type': 'Rack-TowerServer', 'uuid': '223D2C88C8FD11E4947B6EAE8B4BDCDF'}]}




Status

Authors

  • Naval Patel (@navalkp)
  • Prashant Bhosale (@prabhosa)

Hint

If you notice any issues in this documentation you can edit this document to improve it.


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/lxca_nodes_module.html