Hi@akhtar,
The docker_network module (Ansible 2.2 or higher) can create a network in docker. You can use this module to create the network and after that use the docker_container module to lunch the container within that network.
vars:
docker_network: ansible_net
- name: "Create a network"
docker_network:
name: "{{ docker_network }}"