---

- hosts: hip
  #become: yes
  tasks:

    - name: Install Docker SDK for Python via apt
      ansible.builtin.apt:
        name: python3-docker
        state: present
      become: yes

    - name: Create a network with custom IPAM config
      community.docker.docker_network:
        name: overlay_net
        driver_options:
          com.docker.network.bridge.name: overlay_net
        ipam_config:
          - subnet: "{{ docker_overlay_net_subnet }}"
            gateway: "{{ docker_overlay_net_gateway }}"
            iprange: "{{ docker_overlay_net_iprange }}"
            #aux_addresses:
             # host1: 172.23.27.3
              #host2: 172.23.27.4
