diff --git a/ansible-playbook.yml b/ansible-playbook.yml index c3768de..d40aaed 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -6,6 +6,7 @@ wipe: false c_state: '{{ "absent" if wipe | bool else "started" }}' i_state: present + alpine: false tasks: - name: create docker network docker_network: @@ -38,7 +39,7 @@ - name: phpmyadmin docker_container: name: pdns-phpmyadmin - image: phpmyadmin/phpmyadmin:4.7 + image: phpmyadmin/phpmyadmin:4.8 pull: true state: '{{ c_state }}' purge_networks: true @@ -60,10 +61,21 @@ tags: - pdns + - name: build pdns alpine version + docker_image: + name: my-pdns + tag: alpine + state: '{{ i_state }}' + force: true + path: ./pdns + dockerfile: Dockerfile.alpine + tags: + - pdns + - name: pdns master docker_container: name: pdns - image: my-pdns + image: my-pdns:{{ "alpine" if alpine | bool else "latest" }} state: '{{ c_state }}' hostname: ns1.example.com purge_networks: true @@ -82,6 +94,7 @@ PDNS_api_key: secret PDNS_webserver: yes PDNS_webserver_address: 0.0.0.0 + PDNS_webserver_allow_from: 172.5.0.0/16 PDNS_version_string: anonymous PDNS_default_ttl: 1500 PDNS_soa_minimum_ttl: 1200 @@ -95,7 +108,7 @@ - name: pdns slave docker_container: name: pdns-slave - image: my-pdns + image: my-pdns:{{ "alpine" if alpine | bool else "latest" }} state: '{{ c_state }}' hostname: ns2.example.com purge_networks: true @@ -113,6 +126,7 @@ PDNS_slave: yes PDNS_webserver: yes PDNS_webserver_address: 0.0.0.0 + PDNS_webserver_allow_from: 172.5.0.0/16 PDNS_version_string: anonymous PDNS_disable_axfr: yes PDNS_allow_notify_from: '{{ pdns_master_ip }}'