# vim: ft=yaml.ansible --- - name: Create Docker network for services community.docker.docker_network: name: services enable_ipv6: true ipam_config: - subnet: 172.17.2.0/24 - subnet: fd02::/64 state: present - name: Create Docker network for Tor community.docker.docker_network: name: tor enable_ipv6: true ipam_config: - subnet: 172.17.3.0/24 - subnet: fd03::/64 state: present - name: Create base directory for Docker volumes ansible.builtin.file: path: "{{ base_volume }}" owner: root mode: u=rwx,g=rx,o=rx state: directory - name: Copy nginx.conf to shared location ansible.builtin.copy: src: shared/nginx.conf dest: "{{ base_volume }}/nginx.conf" owner: root mode: u=rw,g=r,o=r - name: Deploy services ansible.builtin.include_tasks: services/{{ item.key }}.yml loop: "{{ services | dict2items }}" when: single_service is not defined - name: Deploy single service ansible.builtin.include_tasks: services/{{ single_service }}.yml when: single_service is defined and single_service in services