From 7846c1b100d9160accdb2e8acda11f4cafff260c Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Tue, 24 Nov 2020 22:45:02 +0100 Subject: [PATCH] Add docker_setup for network and phpmyadmin container --- tasks/docker_setup.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tasks/docker_setup.yml diff --git a/tasks/docker_setup.yml b/tasks/docker_setup.yml new file mode 100644 index 0000000..59fdb63 --- /dev/null +++ b/tasks/docker_setup.yml @@ -0,0 +1,24 @@ +- name: Setup docker network + docker_network: + name: dockernet + driver: bridge + ipam_config: + - subnet: 192.168.0.0/24 + gateway: 192.168.0.1 + state: present + +- name: Setup phpmyadmin + docker_container: + name: phpmyadmin + state: started + image: phpmyadmin:5.0 + networks_cli_compatible: true + networks: + - name: dockernet + restart_policy: always + env: + PMA_HOST: 192.168.0.1 + MYSQL_ROOT_PASSWORD: "{{ mysql_root_pw }}" + PMA_ABSOLUTE_URI: "https://mysql.adm.netz39.de" + published_ports: + - 9001:80