You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That documentation is about docker-compose v2, and does not necessarily apply to docker-compose v1.
In any case, the module uses docker-compose internals to achieve it goals. The module uses project_from_options from docker-compose, which in turn calls get_profiles_from_options to extract COMPOSE_PROFILES from the env file - if --profile hasn't been specified on the CLI command line, which happens if the module's profiles option is used. So I guess it should work, but I guess someone needs to do more debugging to figure out what exactly happens.
SUMMARY
The
docker_compose
module does not respect compose profiles which are specified via env variableCOMPOSE_PROFILES
using the.env
file.ISSUE TYPE
COMPONENT NAME
docker_compose
ANSIBLE VERSION
COLLECTION VERSION
OS / ENVIRONMENT
arch linux
STEPS TO REPRODUCE
Use the following .env file:
EXPECTED RESULTS
The profile
foo
is activated.I.e., the very same behavior as when running
docker-compose up
directly.ACTUAL RESULTS
The profile
foo
is not activated. Thus, it runs withprofiles=[]
.The text was updated successfully, but these errors were encountered: