Hi@akhtar,
You can use the docker_container module in Ansible. This module is used to create a docker container. I have attached one playbook below for your reference. 
  - name: Create a docker container
    docker_container:
      name: myos
      image: vimal13/apache-webserver-php
      ports:
        - "82:80"
You can also go through the Ansible document for more information.
https://docs.ansible.com/ansible/latest/modules/docker_container_module.html