Skip to content

Commit

Permalink
Ansible lint, update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pschiffe committed Dec 17, 2023
1 parent c7d2da3 commit 82550ee
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
90 changes: 43 additions & 47 deletions ansible-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- hosts: localhost
- name: PDNS
hosts: localhost
vars:
pdns_master_ip: 172.5.0.20
pdns_slave_ip: 172.5.0.21
Expand All @@ -8,8 +9,8 @@
i_state: present
alpine: false
tasks:
- name: create docker network
docker_network:
- name: Create docker network
community.docker.docker_network:
name: pdns-net
state: present
ipam_config:
Expand All @@ -20,8 +21,8 @@
- pdns-admin
- pdns-recursor

- name: build pdns recursor
docker_image:
- name: Build pdns recursor
community.docker.docker_image:
name: pschiffe/pdns-recursor
state: '{{ i_state }}'
source: build
Expand All @@ -32,8 +33,8 @@
tags:
- pdns-recursor

- name: build pdns recursor alpine version
docker_image:
- name: Build pdns recursor alpine version
community.docker.docker_image:
name: pschiffe/pdns-recursor
tag: alpine
state: '{{ i_state }}'
Expand All @@ -46,26 +47,26 @@
tags:
- pdns-recursor

- name: pdns recursor
docker_container:
- name: PDNS recursor
community.docker.docker_container:
name: pdns-recursor
image: pschiffe/pdns-recursor:{{ "alpine" if alpine | bool else "latest" }}
state: '{{ c_state }}'
networks_cli_compatible: true
networks:
- name: pdns-net
volumes:
- /etc/localtime:/etc/localtime:ro
ulimits:
- 'nofile:5000:5000'
tags:
- pdns-recursor

- name: db
docker_container:
- name: DB
community.docker.docker_container:
name: pdns-mariadb
image: mariadb:10.11
image: mariadb:11
pull: true
state: '{{ c_state }}'
networks_cli_compatible: true
networks:
- name: pdns-net
aliases:
Expand All @@ -77,19 +78,18 @@
env:
MYSQL_ROOT_PASSWORD: 'my-secret-pw'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized']
timeout: 10s
retries: 5
tags:
- db

- name: phpmyadmin
docker_container:
- name: Phpmyadmin
community.docker.docker_container:
name: pdns-phpmyadmin
image: phpmyadmin:5
pull: true
state: '{{ c_state }}'
networks_cli_compatible: true
networks:
- name: pdns-net
published_ports:
Expand All @@ -99,8 +99,8 @@
tags:
- db

- name: build pdns
docker_image:
- name: Build pdns
community.docker.docker_image:
name: pschiffe/pdns-mysql
state: '{{ i_state }}'
source: build
Expand All @@ -111,8 +111,8 @@
tags:
- pdns

- name: build pdns alpine version
docker_image:
- name: Build pdns alpine version
community.docker.docker_image:
name: pschiffe/pdns-mysql
tag: alpine
state: '{{ i_state }}'
Expand All @@ -125,13 +125,12 @@
tags:
- pdns

- name: pdns master
docker_container:
- name: PDNS master
community.docker.docker_container:
name: pdns
image: pschiffe/pdns-mysql:{{ "alpine" if alpine | bool else "latest" }}
state: '{{ c_state }}'
hostname: ns1.example.com
networks_cli_compatible: true
networks:
- name: pdns-net
ipv4_address: '{{ pdns_master_ip }}'
Expand All @@ -155,13 +154,12 @@
tags:
- pdns

- name: pdns slave
docker_container:
- name: PDNS slave
community.docker.docker_container:
name: pdns-slave
image: pschiffe/pdns-mysql:{{ "alpine" if alpine | bool else "latest" }}
state: '{{ c_state }}'
hostname: ns2.example.com
networks_cli_compatible: true
networks:
- name: pdns-net
ipv4_address: '{{ pdns_slave_ip }}'
Expand All @@ -185,8 +183,8 @@
tags:
- pdns

- name: build pdns-admin base
docker_image:
- name: Build pdns-admin base
community.docker.docker_image:
name: pschiffe/pdns-admin-base
tag: latest
state: '{{ i_state }}'
Expand All @@ -198,8 +196,8 @@
tags:
- pdns-admin

- name: build pdns-admin backend
docker_image:
- name: Build pdns-admin backend
community.docker.docker_image:
name: pschiffe/pdns-admin-uwsgi
tag: latest
state: '{{ i_state }}'
Expand All @@ -211,8 +209,8 @@
tags:
- pdns-admin

- name: build pdns-admin frontent
docker_image:
- name: Build pdns-admin frontent
community.docker.docker_image:
name: pschiffe/pdns-admin-static
tag: latest
state: '{{ i_state }}'
Expand All @@ -224,12 +222,11 @@
tags:
- pdns-admin

- name: pdns-admin backend
docker_container:
- name: PDNS-admin backend
community.docker.docker_container:
name: pdns-admin-uwsgi
image: pschiffe/pdns-admin-uwsgi
state: '{{ c_state }}'
networks_cli_compatible: true
networks:
- name: pdns-net
aliases:
Expand All @@ -238,17 +235,16 @@
- /etc/localtime:/etc/localtime:ro
env:
PDNS_ADMIN_SQLA_DB_PASSWORD: "'my-secret-pw'"
PDNS_VERSION: "4.7"
PDNS_VERSION: "4.8"
PDNS_API_KEY: "secret"
tags:
- pdns-admin

- name: pdns-admin frontend
docker_container:
- name: PDNS-admin frontend
community.docker.docker_container:
name: pdns-admin-static
image: pschiffe/pdns-admin-static
state: '{{ c_state }}'
networks_cli_compatible: true
networks:
- name: pdns-net
published_ports:
Expand All @@ -258,14 +254,14 @@
tags:
- pdns-admin

- name: remove docker volumes
command: docker volume rm pdns-mariadb-volume
ignore_errors: true
- name: Remove docker volume
community.docker.docker_volume:
name: pdns-mariadb-volume
state: absent
when: wipe | bool

- name: remove network
docker_network:
- name: Remove network
community.docker.docker_network:
name: pdns-net
state: absent
ignore_errors: true
when: wipe | bool
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ services:
- pdns
volumes:
- /etc/localtime:/etc/localtime:ro
ulimits:
nofile:
soft: 5000
hard: 5000

mariadb:
image: mariadb:10.11
image: mariadb:11
networks:
pdns:
aliases:
Expand All @@ -22,7 +26,7 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
test: ['CMD', 'healthcheck.sh', '--su=mysql', '--connect', '--innodb_initialized']
timeout: 10s
retries: 5

Expand Down Expand Up @@ -100,7 +104,7 @@ services:
- /etc/localtime:/etc/localtime:ro
environment:
- PDNS_ADMIN_SQLA_DB_PASSWORD='my-secret-pw'
- PDNS_VERSION=4.7
- PDNS_VERSION=4.8
- PDNS_API_KEY=secret
depends_on:
- mariadb
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/admin-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
- name: PDNS_API_URL
value: "http://master-api-pdns:8081/"
- name: PDNS_VERSION
value: "4.7"
value: "4.8"
- name: PDNS_API_KEY
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/mariadb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: mariadb-pdns
image: mariadb:10.11
image: mariadb:11
imagePullPolicy: Always
env:
- name: MYSQL_ROOT_PASSWORD
Expand Down

0 comments on commit 82550ee

Please sign in to comment.