puppetlabs / puppetlabs/puppetlabs-docker
up_args parameter for docker_compose doesn't handle argument with value
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 94
- Forks
- 337
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 2
Description
Describe the Bug
When using argument with value like --pull always in up_args argument an error is thrown:
change from 'absent' to 'present' failed: Execution of /usr/bin/docker compose -f /myproject/compose.yml -p myproject up --pull always -d --remove-orphans' returned 16: unknown flag: --pull always
Expected Behavior
Execution doesn't fail.
Changing type of up_args from string to Array fix the issue
Steps to Reproduce
Use the following code:
docker_compose { "myproject":
ensure => present,
compose_files => ["/myproject/compose.yml"],
up_args => ['--pull','always'],
}
Environment
- Version module [10.0.1]
- Version docker engine : 27.2.1
- Platform [Debian 11]
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 at the docker_compose resource's up_args handling and reproduce the failure with the configuration shown. Done means arguments such as --pull and always are passed separately to Docker Compose and the command completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, ruby
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100