puppetlabs-docker icon indicating copy to clipboard operation
puppetlabs-docker copied to clipboard

up_args parameter for docker_compose doesn't handle argument with value

Open mcarrolle opened this issue 1 year ago • 0 comments

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]

mcarrolle avatar Sep 12 '24 12:09 mcarrolle