Docker module for `docker-compose run`?

In writing a playbook to bring up sentry according to its docs with docker-compose, I ended up with a task list including:

  • name: run database migrations

command:

docker-compose run --rm web upgrade --noinput

chdir=/opt/sentry-onpremise

  • name: create initial user

command:

docker-compose run --rm web createuser

–email nobody@example.com

–password supersecretpassword

–superuser

chdir=/opt/sentry-onpremise

  • name: start docker service

docker_service:

project_src: /opt/sentry-onpremise

state: present

Is there docker module I could be using instead of the command module calls to `docker-compose run`?

For reference, the docker compose file I’m using is at https://github.com/refinery29/sentry-onpremise/blob/master/docker-compose.yml (forked from the original).

http://docs.ansible.com/ansible/latest/docker_service_module.html

I’m aware of that module and am using it in that task list where I would run docker-compose up, but I’m not seeing how to use that module for docker-compose run, could you elaborate?