community.general.stacki_host – Add or remove host to stacki front-end
Note
This plugin is part of the community.general collection (version 1.3.2).
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.
- https://github.com/StackIQ/stacki
Parameters
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| force_install boolean |
| Set value to True to force node into install state if it already exists in stacki. |
| name string / required | Name of the host to be added to Stacki. | |
| prim_intf string | Name of the primary network interface. | |
| prim_intf_ip string | IP Address for the primary network interface. | |
| prim_intf_mac string | MAC Address for the primary PXE boot network interface. | |
| stacki_endpoint string / required | URL for the Stacki API Endpoint. | |
| stacki_password string / required | Password for authenticating with Stacki API, but if not specified, the environment variable stacki_password is used instead. | |
| stacki_user string / required | Username for authenticating with Stacki API, but if not specified, the environment variable stacki_user is used instead. | |
| state string |
| Set value to the desired state for the specified host. |
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 | Returned | Description |
|---|---|---|
| changed boolean | always | response to whether or not the api call completed successfully Sample: True |
| stdout list / elements=string | always | the set of responses from the commands Sample: ['...', '...'] |
| stdout_lines list / elements=string | always | the value of stdout split into a list Sample: [['...', '...'], ['...'], ['...']] |
Authors
- Hugh Ma (@bbyhuy) <Hugh.Ma@flextronics.com>
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/stacki_host_module.html