lowell80.splunk.splunk_control (0.12.3) — module

Control the Splunkd service

| "added in version" 0.10.0 of lowell80.splunk"

Authors: Lowell C. Alleman (@lowell80)

Install collection

Install with ansible-galaxy collection install lowell80.splunk:==0.12.3


Add to requirements.yml

  collections:
    - name: lowell80.splunk
      version: 0.12.3

Description

Restart the Splunkd service using Ansible.

This module uses the Python Splunk SDK and requires access to the splunkd administrative port.

Authentication can be handled via either I(username) and I(password) or via I(token).


Requirements

Inputs

    
state:
    choices:
    - running
    - restarted
    - offlined
    default: running
    description:
    - Ensure the service is restarted or offlined.
    required: false

token:
    default: null
    description:
    - Token to use when authentication has already taken place.
    - The C(token) can be specified instead of I(username) and I(password).
    - This module returns an output named I(token) that can be used for subsequent splunkd
      calls to the same splunkd endpoint.
    required: false

timeout:
    default: 300
    description:
    - Amount of time (in seconds) to wait for the server to come back online.
    - Set to 0 to disable the timeout and return immediately.
    required: false

password:
    default: null
    description:
    - The password for username/password authentication.
    - Must be provided if I(username) is provided.
    required: false

username:
    default: null
    description:
    - Splunk username for username/password authentication.
    - When provided, I(password) must also be specified.
    required: false

splunkd_uri:
    aliases:
    - uri
    default: https://localhost:8089
    description:
    - The Splunkd endpoint of the Splunk server to configure.
    - Defaults to the local server and default splunkd port.
    required: false

when_restart_required:
    choices:
    - true
    - false
    default: false
    description:
    - Only restart if the 'restart required' flag has been set.
    - By default, this module will force a restart.