cdillc / cdillc.splunk / 0.26.1 / module / splunk_rest_conf Manage adhoc configurations via the Splunk REST API | "added in version" 0.10.0 of cdillc.splunk" Authors: Lowell C. Alleman (@lowell80)cdillc.splunk.splunk_rest_conf (0.26.1) — module
Install with ansible-galaxy collection install cdillc.splunk:==0.26.1
collections: - name: cdillc.splunk version: 0.26.1
Manage the content of Splunk C(.conf) files via Ansible.
This module uses the Python Splunk SDK to fetch and modify configuration settings via the Splunk REST endpoint of a running C(splunkd) service.
Authentication can be handled via either I(username) and I(password) or via I(token).
app: default: null description: - The Splunk "app" (namespace) where the stanza lives or will be created. - The special value of C(system) can be used to indicate no app association. required: false conf: choices: - server - props - transforms - macros default: null description: - The configuration type to manage or view. - The list of choices provided here are for reference only and are not enforced by the module. - Any value supported by the underling Splunk SDK / REST API should work. required: true owner: default: null description: - The Splunk owner (namespace) of the stanza. - Use the special value of C(nobody) if no owner is desired. - The value of C(sharing) may also impact the owner. required: false state: choices: - present - absent - list default: present description: - Ensure the configuration settings are either present or absent, or to list existing settings. - The C(content) output contains the final setting. - If the state is absent, the C(content) output will be missing if the stanza was previously removed. 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 stanza: default: null description: - The stanza to edit within the given I(conf) configuration file. required: true sharing: choices: - user - app - global - system default: global description: - The Splunk sharing mode to use for stanza creation or modification. - See the note on "Splunk namespaces" below. - The default C(global) will create entries that are placed in C(etc/system/local/) required: false defaults: default: {} description: - The dictionary of key/values to push into a newly created stanza. - Use this to set stanza defaults that you do not want to override on subsequent runs. - The I(defaults) option is only used when C(state=present) and a new stanza is created. - If a new stanza is created, the I(result) output will contain the value C(created). required: false password: default: null description: - The password for username/password authentication. - Must be provided if I(username) is provided. required: false settings: default: {} description: - The dictionary of key/values to push into the given stanza. - The I(settings) option must be provided when C(state=present). - The final value of the stanza is returned via the I(content) output. required: false username: default: null description: - Splunk username for username/password authentication. - When provided, I(password) must also be specified. required: false del_unknown: default: false description: - Not implemented yet! - Remove any keys in the servers configuration that are not present within the I(settings) dictionary. - This feature does not yet exist in the code. - Currently only adding or updated keys or removing the entire stanza is supported. required: false type: bool 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 restart_timeout: default: null description: - Amount of time to wait for the restart to complete. - If I(restart_timeout) is 0 then the restart wait is disabled. required: false restart_on_change: default: false description: - Enable an immediate splunkd restart on configuration change. required: false type: bool