Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/pgadmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The role will:
| `pgadmin_default_email` | `str` | `False` | `[email protected]` | Email account for the default user to access the pgAdmin web UI. This user is created on first launch of the container. |
| `pgadmin_default_password` | `str` | `False` | `pgadmin` | Password for the default user to access the pgAdmin web UI. **It is highly recommended to change this default password for production environments.** |
| `pgadmin_docker_exe` | `str` | `False` | `/usr/bin/docker` | The full path to the Docker executable on the target host. |
| `pgadmin_docker_network_subnet_cidr` | `str` | `False` | `172.21.0.0/16` | Subnet CIDR for the Docker bridge network used by pgadmin. |
| `pgadmin_docker_network_subnet_gateway` | `str` | `False` | `172.21.0.1` | Gateway for the Docker bridge network subnet used by pgadmin. |

# Example Playbook

Expand Down
3 changes: 3 additions & 0 deletions roles/pgadmin/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ pgadmin_default_email: "[email protected]"
pgadmin_default_password: "pgadmin"

pgadmin_docker_exe: /usr/bin/docker

pgadmin_docker_network_subnet_cidr: 172.21.0.0/16
pgadmin_docker_network_subnet_gateway: 172.21.0.1
10 changes: 10 additions & 0 deletions roles/pgadmin/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,13 @@ argument_specs:
type: str
required: false
default: "/usr/bin/docker"
pgadmin_docker_network_subnet_cidr:
description: Subnet CIDR for the Docker bridge network used by pgadmin.
type: str
required: false
default: "172.21.0.0/16"
pgadmin_docker_network_subnet_gateway:
description: Gateway for the Docker bridge network subnet used by pgadmin.
type: str
required: false
default: "172.21.0.1"
10 changes: 10 additions & 0 deletions roles/pgadmin/templates/pgadmin-docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
image: dpage/pgadmin4:latest
container_name: pgadmin4_container
restart: always
networks:
- pg_network
ports:
- "{{ pgadmin_port }}:80"
entrypoint: /bin/sh -c "chmod 600 /pgpass; /entrypoint.sh;"
Expand All @@ -19,3 +21,11 @@ services:

volumes:
pgadmin-data:

networks:
pg_network:
driver: bridge
ipam:
config:
- subnet: {{ pgadmin_docker_network_subnet_cidr }}
gateway: {{ pgadmin_docker_network_subnet_gateway }}
Loading