Docker Compose Module Issue - Trying to Stop Some Services

Hello there, hope this is the right place to ask.

Im trying to accomplish the following using docker_compose module, the idea is, I have a compose file which runs
some services and I want to stop some of them but not all, I know beforehands the ones that I do not want to stop, so
am trying to do the following, define vars with the services I do not want to stop, leave them running but the rest.
somehow this is not working for me, the when clause seems not to be being evaluated, services variable and
running_services fact show their content, so is not empty, maybe the services tag in docker_compose expects something
different, if I run the following it just stops all the services.

Any hint really appreciated.

Hello there, hope this is the right place to ask.

Im trying to accomplish the following using docker_compose module, the idea is, I have a compose file which runs
some services and I want to stop some of them but not all, I know beforehands the ones that I do not want to stop, so
am trying to do the following, define vars with the services I do not want to stop, leave them running but the rest.
somehow this is not working for me, the when clause seems not to be being evaluated, services variable and
running_services fact show their content, so is not empty, maybe the services tag in docker_compose expects something
different, if I run the following it just stops all the services.

Any hint really appreciated.

I think that defeats the purpose of docker-compose. You could stop the services with the docker_container module.

Regards
        Racke