The error was: 'dict object' has no attribute 'path' during startup
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 549
- Forks
- 277
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ansible/roles/splunk_common/tasks/install_apps.yml at the reported “Infer app filepath” task, then inspect how SPLUNK_APPS_URL is parsed from the docker-compose.yml environment value. Reproduce startup with the listed comma-separated paths and verify that valid app locations no longer cause the undefined path error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, docker
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100