ansible.builtin.stacki_host (v2.9.27) — module

Add or remove host to stacki front-end

| "added in version" 2.3 of ansible.builtin"

Authors: Hugh Ma (@bbyhuy) <Hugh.Ma@flextronics.com>

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Use this module to add or remove hosts to a stacki front-end via API.

U(https://github.com/StackIQ/stacki)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a host named test-1
  stacki_host:
    name: test-1
    stacki_user: usr
    stacki_password: pwd
    stacki_endpoint: url
    state: absent

Inputs

    
name:
    description:
    - Name of the host to be added to Stacki.
    required: true

prim_intf:
    description:
    - Name of the primary network interface.

stacki_user:
    description:
    - Username for authenticating with Stacki API, but if not specified, the environment
      variable C(stacki_user) is used instead.
    required: true

prim_intf_ip:
    description:
    - IP Address for the primary network interface.

force_install:
    description:
    - Set value to True to force node into install state if it already exists in stacki.
    type: bool

prim_intf_mac:
    description:
    - MAC Address for the primary PXE boot network interface.

stacki_endpoint:
    description:
    - URL for the Stacki API Endpoint.
    required: true

stacki_password:
    description:
    - Password for authenticating with Stacki API, but if not specified, the environment
      variable C(stacki_password) is used instead.
    required: true

Outputs

changed:
  description: response to whether or not the api call completed successfully
  returned: always
  sample: true
  type: bool
stdout:
  description: the set of responses from the commands
  returned: always
  sample:
  - '...'
  - '...'
  type: list
stdout_lines:
  description: the value of stdout split into a list
  returned: always
  sample:
  - - '...'
    - '...'
  - - '...'
  - - '...'
  type: list