Documentation

stacki_host - Add or remove host to stacki front-end

New in version 2.3.

Synopsis

Options

parameter required default choices comments
force_install
no
Set value to True to force node into install state if it already exists in stacki.
name
yes
Name of the host to be added to Stacki.
prim_intf
no
Name of the primary network interface.
prim_intf_ip
no
IP Address for the primary network interface.
prim_intf_mac
no
MAC Address for the primary PXE boot network interface.
stacki_endpoint
yes
URL for the Stacki API Endpoint.
stacki_password
yes
Password for authenticating with Stacki API, but if not specified, the environment variable stacki_password is used instead.
stacki_user
yes
Username for authenticating with Stacki API, but if not specified, the environment variable stacki_user is used instead.

Examples

- name: Add a host named test-1
  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
  stacki_host:
    name: test-1
    stacki_user: usr
    stacki_password: pwd
    stacki_endpoint: url
    state: absent

Return Values

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

name description returned type sample
stdout_lines
the value of stdout split into a list
always list [['...', '...'], ['...'], ['...']]
changed
response to whether or not the api call completed successfully
always boolean True
stdout
the set of responses from the commands
always list ['...', '...']


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.