mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-15 08:30:46 +02:00
23 lines
570 B
YAML
23 lines
570 B
YAML
- name: Create Docker network for PostgreSQL
|
|
community.docker.docker_network:
|
|
name: "{{ postgres_network_name }}"
|
|
state: present
|
|
ipam_config:
|
|
- subnet: "{{ postgres_subnet }}"
|
|
|
|
- name: "include docker-compose role"
|
|
include_role:
|
|
name: docker-compose
|
|
|
|
- name: Wait for Postgres inside the container
|
|
shell: "docker exec {{ postgres_name }} pg_isready -U postgres"
|
|
register: pg_ready
|
|
until: pg_ready.rc == 0
|
|
retries: 30
|
|
delay: 5
|
|
|
|
- name: install python-psycopg2
|
|
community.general.pacman:
|
|
name: python-psycopg2
|
|
state: present
|