Ansible w/ Docker - Show current Container state

Hello fellas!

Im working on a little project in which I’m using Docker Containers.

I’ll keep my question short:

I want to get the state of a running docker container!

What I mean by that is, that i want to get the current state of the container, that Docker shows you by using the “docker ps” command.

Examples would be:

  1. Up
  2. Exited
  3. Restarting
    I want to get one of those results from a specific container. But without using the Command or the Shell module!

KR