cdillc.splunk.splunk_facts module – Gathers facts about a Splunk installation
Note
This module is part of the cdillc.splunk collection (version 0.26.1).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cdillc.splunk
.
To use it in a playbook, specify: cdillc.splunk.splunk_facts
.
New in cdillc.splunk 0.10.0
Synopsis
This module collects various pieces of data about a Splunk installation.
Splunk apps data collection.
Parameters
Parameter |
Comments |
---|---|
List of paths (relative to $SPLUNK_HOME/etc). And absolute path can be provided to check a specific path. Default: |
|
Set the level of ksconf detail to collect. Use skip to disable all ksconf related facts, short to collect basic information, and detail to show information about the available subcommands. Choices:
|
|
Path to Splunk installation path. If not provided, this module will check the $SPLUNK_HOME environment variable and then several commonly used install paths. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Action returns an |
Notes
Note
Parameters to enable/disable various config or run-time stats may be added later.
Examples
Typical use:
- splunk_facts:
Or specify a custom Splunk install home
- splunk_facts: splunk_home=/opt/acmeco/splunk
Splunk facts for app hosted in a git repository:
- splunk_facts: app_dirs=/opt/git-repo/apps
Returned Facts
Facts returned by this module are added/updated in the hostvars
host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
Key |
Description |
---|---|
App paths that were inaccessible and therefore are not listed in ansible_splunk_apps. Returned: success |
|
A list of Splunk apps found. Collection is restricted to the given set of apps in one of the provided app_dirs. Returned: success |
|
Configuration information extracted from Only attributes present will be returned, unless otherwise noted. Data types noted below are based on normal app conventions. However, if the app provides unexpected values (like a non-integer Returned: always |
|
Returned: always |
|
Returned: success |
|
Returned: success |
|
Longer description contained with the app. (This is not typically shown anywhere in the UI) Returned: success |
|
Is the app visible in the user interface Returned: success |
|
Display name Returned: success |
|
Returned: success |
|
Returned: always |
|
Folder name of the Splunk app Returned: always |
|
Full path to Splunk application. This will uniquely identify an app. Returned: always |
|
app location prefix (based on the given value of app_dirs) Returned: always Sample: |
|
Data loaded is dependent upon the version of ksconf and the sideload module. Returned: Only present if the app was installed via ksconf_sideload_app module. |
|
Returned: success |
|
Returned: success |
|
Returned: success |
|
Returned: success |
|
splunk configs Returned: success Sample: |
|
distributed search public key Returned: success |
|
ksconf version information Returned: when requested |
|
Returned: success |
|
Returned: success |
|
The key <command> is dynamically set for each sub-command of the ksconf tool. Returned: success Sample: |
|
class name Returned: success |
|
Returned: success |
|
Any errors related to specific ksconf commands. This can happen for example if some Python modules are missing such as lxml or splunksdk. Returned: on error |
|
Returned: success |
|
Returned: success |
|
Returned: success |
|
Returned: success |
|
Splunk’s startup configuration files located in The exact keys located here will vary based on which settings are present. Contents shown here are based on popular settings. Returned: success |
|
Returned: success |
|
Default path to splunk indexes. Returned: success |
|
Name of the user Splunk runs as. Returned: success |
|
Local server’s name. Popular values include Returned: success |
|
Software id tags Returned: success |
|
Software name. Examples include Returned: success Sample: |
|
Returned: success |
|
Returned: success |
|
Version of the Splunk software found Returned: always |
|
Returned: success |
|
Returned: success |
|
Returned: success |
|
Returned: success Sample: |
|
public key for splunkd Returned: success |