puppetlabs / puppetlabs-docker

The Puppet Docker repository
Apache License 2.0
91 stars 311 forks source link

up_args parameter for docker_compose doesn't handle argument with value #996

Open mcarrolle opened 2 months ago

mcarrolle commented 2 months ago

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