splunk / splunk/docker-splunk

Splunkbase app not installed when using SPLUNK_APPS_URL

Open
#673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
549
Forks
277
Avg merge
3d 9h
Merged PRs (30d)
2

Description

If the compose.yml file contains a reference to a SPLUNKBASE app URL like:

  so1:
    environment:
      SPLUNK_APPS_URL: https://splunkbase.splunk.com/app/1924/release/7.2.1/download
      SPLUNK_PASSWORD: <password>
      SPLUNK_STANDALONE_URL: so1
      SPLUNK_START_ARGS: --accept-license
      SPLUNKBASE_PASSWORD: <sb_password>
      SPLUNKBASE_USERNAME: <sb_user>
      TZ: Europe/Brussels

the container fails to start with the following error message:

so1-1  | TASK [splunk_standalone : Install app via REST] ********************************
so1-1  | fatal: [localhost]: FAILED! => {}
so1-1  | 
so1-1  | MSG:
so1-1  | 
so1-1  | The conditional check ''itsi' not in app_contents.stdout_lines' failed. The error was: error while evaluating conditional ('itsi' not in app_contents.stdout_lines): 'dict object' has no attribute 'stdout_lines'
so1-1  | 
so1-1  | The error appears to be in '/opt/ansible/roles/splunk_common/tasks/install_apps.yml': line 73, column 3, but may
so1-1  | be elsewhere in the file depending on the exact syntax problem.
so1-1  | 
so1-1  | The offending line appears to be:
so1-1  | 
so1-1  | 
so1-1  | - name: Install app via REST
so1-1  |   ^ here
so1-1  | 
so1-1  | 
so1-1  | PLAY RECAP *********************************************************************
so1-1  | localhost                  : ok=82   changed=17   unreachable=0    failed=1    skipped=84   rescued=0    ignored=0  

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the SPLUNK_APPS_URL example in compose.yml, then inspect the Install app via REST task at /opt/ansible/roles/splunk_common/tasks/install_apps.yml line 73. Confirm the fix by starting the container successfully and verifying that the Splunkbase app is installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, docker-compose
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.