community.general.stacki_host module – Add or remove host to stacki front-end
Note
This module is part of the community.general collection (version 9.5.1).
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
.
To use it in a playbook, specify: community.general.stacki_host
.
Synopsis
Use this module to add or remove hosts to a stacki front-end via API.
Information on stacki can be found at https://github.com/StackIQ/stacki.
Parameters
Parameter |
Comments |
---|---|
Appliance to be used in host creation. Required if Default: |
|
Set value to Choices:
|
|
Name of the host to be added to Stacki. |
|
Network to be configured in the host. Currently not used by the module. Default: |
|
Name of the primary network interface. Currently not used by the module. |
|
IP Address for the primary network interface. Currently not used by the module. |
|
MAC Address for the primary PXE boot network interface. Currently not used by the module. |
|
Rank to be used in host creation. In Stacki terminology, the rank is the position of the machine in a rack. Required if Default: |
|
URL for the Stacki API Endpoint. |
|
Password for authenticating with Stacki API, but if not specified, the environment variable |
|
Username for authenticating with Stacki API, but if not specified, the environment variable |
|
Set value to the desired state for the specified host. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Add a host named test-1
community.general.stacki_host:
name: test-1
stacki_user: usr
stacki_password: pwd
stacki_endpoint: url
prim_intf_mac: mac_addr
prim_intf_ip: x.x.x.x
prim_intf: eth0
- name: Remove a host named test-1
community.general.stacki_host:
name: test-1
stacki_user: usr
stacki_password: pwd
stacki_endpoint: url
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
response to whether or not the api call completed successfully Returned: always Sample: |
|
the set of responses from the commands Returned: always Sample: |
|
the value of stdout split into a list Returned: always Sample: |