docker-splunk
docker-splunk copied to clipboard
The error was: 'dict object' has no attribute 'path' during startup
trafficstars
When using the SPLUNK_APPS_URL= environment param, the startup stops with:
deploy1 | TASK [splunk_deployment_server : Infer app filepath] ***************************
deploy1 | fatal: [localhost]: FAILED! => {}
deploy1 |
deploy1 | MSG:
deploy1 |
deploy1 | The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'path'
deploy1 |
deploy1 | The error appears to be in '/opt/ansible/roles/splunk_common/tasks/install_apps.yml': line 45, column 5, but may
deploy1 | be elsewhere in the file depending on the exact syntax problem.
deploy1 |
deploy1 | The offending line appears to be:
deploy1 |
deploy1 |
deploy1 | - name: Infer app filepath
deploy1 | ^ here
The docker-compose.yml has the following excerpt:
deploy1:
networks:
splunknet:
aliases:
- deploy1
image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
hostname: deploy1
container_name: deploy1
environment:
- SPLUNK_START_ARGS=--accept-license
- SPLUNK_ROLE=splunk_deployment_server
- SPLUNK_APPS_URL=/home/matthew/docker/packages/myapp.tar.gz,/home/matthew/docker/packages/splunk-add-on-for-microsoft-windows_820.tgz,/home/matthew/docker/packages/splunk-add-on-for-unix-and-linux_830.tgz
- SPLUNK_PASSWORD
Is there anything incorrect with the definition of the path/app locations specified here?
I was having this same issue, I had forgotten to mount the volume that the app files where stored.
A subset of my docker-compose file looks like this
version: '3.6'
services:
splunkenterprise:
hostname: splunkenterprise
image: splunk/splunk:8.2
environment:
SPLUNK_APPS_URL: /opt/splunk/apps/splunkForwarderConfig.spl
volumes:
- /opt/splunk/apps:/opt/splunk/apps <----- this is the line that fixed it