Hi@akhtar,
You can use the docker_container module in Ansible. This module will connect to the Docker server and launch the container. You can see the below playbook.
- name: Run redis container
  docker_container:
    name: myredis
    image: redis
    command: redis-server --appendonly yes
    state: started
    exposed_ports:
      - 6379
    volumes_from:
      - mydata