puppetlabs / puppetlabs/puppetlabs-docker

up_args parameter for docker_compose doesn't handle argument with value

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

Nobody has claimed this yet.

bug
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.