v10 uses docker arguments and options in the wrong order.
Describe the Bug
v10 breaks puppet during the docker compose check if exists. The argument array is adding the docker options between the -p and project_name.
Commit that added the issue: https://github.com/puppetlabs/puppetlabs-docker/pull/975/files#diff-0b884d248175f3ad6cf5342c74d8d766c5b6ab28ffdb31f369c614b67b5f36dd
The array has now 5 elements and it inserts in a wrong position (3): args = ['compose', compose_files, '-p', name, 'config'].insert(3, resource[:options]).compact
#Puppet debug:
Info: Checking for compose project portainer
Debug: Executing: '/usr/bin/docker compose -f /var/docker/portainer/docker-compose.yml -p --project-directory=/var/docker/portainer portainer config'
Error: /Stage[main]/Profiles::System::Docker_server/Apps::Docker::Portainer[portainer]/Apps::Docker::Webapp[portainer]/Apps::Docker::App[portainer]/Docker_compose[portainer]: Could not evaluate: (
Expected Behavior
Arguments array should insert the docker options after the -p
Puppet debug:
Info: Checking for compose project portainer Debug: Executing: '/usr/bin/docker compose -f /var/docker/portainer/docker-compose.yml -p portainer --project-directory=/var/docker/portainer config'
Steps to Reproduce
Declare a docker_compose resource with options (for example --project-directory)
Environment
- Version 10.0.0
- Platform Ubuntu 20.04
- Puppet7