lowell80.splunk.ksconf_package (0.12.3) — module

Create a Splunk app from a local directory

| "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

Build a Splunk app using the I(ksconf package) functionality.

The source directory may contain layers


Requirements

Inputs

    
file:
    description: 'Tarball file created of the app.  This can be I(.spl) or I(.tar.gz)
      This parameter supports dynamic placeholders. Variables are listed L(here,https://ksconf.readthedocs.io/en/stable/cmd_package.html#variables)

      '
    required: true
    type: path

block:
    default: []
    description: Pattern for files/directories to exclude.
    elements: path
    type: list

local:
    choices:
    - preserve
    - block
    - promote
    default: preserve
    description:
    - Define handling of of C(local) directory and C(local.meta) file.
    - Use I(preserve) to keep the local artifacts as-is.
    - I(block) will exclude local artifacts from the generated app archive.
    - I(promote) will merge any local artifacts into the default layer.
    type: str

layers:
    default: []
    description:
    - Include and exclude rules regarding which layers to include in the generated app.
    - Layer filters rules are evaluated sequentially, and the last match wins.
    - List of dictionaries with a single key, either I(include) or I(exclude)
    elements: dict
    suboptions:
      exclude:
        description: Specify a layer or layer glob pattern to exclude.
        type: str
      include:
        description: Specify a layer or layer glob pattern to include.
        type: str
    type: list

source:
    aliases:
    - src
    description: Path to input directory for the app
    required: true
    type: path

context:
    description: -Free-form metadata that is passed through to the output. - Use this
      to pass around important app context variables that can be conveniently retained
      when looping and using C(register).
    type: dict

app_name:
    description:
    - Specify the top-level folder (app) name.
    - If this is not given, the app folder name is automatically extracted from the basename
      of C(source).
    - Placeholder variables, such as ``{{app_id}}`` can be used here.
    type: str

layer_method:
    choices:
    - auto
    - dir.d
    - disable
    default: dir.d
    description: Type of layers used within the I(source) directory.

follow_symlink:
    default: false
    description:
    - Follow symbolic links pointing to directories.
    - Symlinks to files are always followed.
    type: bool