8add0260f2
Supported parameters - pool_size how big is the pool - pool_overflow how many overflow connections should be allowed Change-Id: Iba92eb94754ef7314bc3d4bf0e413e7d61e027f8
24 lines
819 B
YAML
24 lines
819 B
YAML
- name: start pg container
|
|
docker:
|
|
name: vagrant_pg_1
|
|
image: alpine-postgres
|
|
ports:
|
|
5432:5432
|
|
env:
|
|
POSTGRES_USER: solar
|
|
POSTGRES_PASSWORD: solar
|
|
POSTGRES_DATABASE: solar
|
|
- name: Waiting for postgresql in container
|
|
shell: docker exec vagrant_pg_1 psql -h localhost -U solar -c "SELECT NOW();"
|
|
register: result
|
|
until: result.rc == 0
|
|
retries: 15
|
|
delay: 1
|
|
- shell: docker exec vagrant_pg_1 psql -h localhost -U solar postgres -c "DROP DATABASE solar;"
|
|
- shell: docker exec vagrant_pg_1 psql -h localhost -U solar postgres -c "CREATE DATABASE solar WITH owner=postgres LC_COLLATE='C' TEMPLATE template0;"
|
|
- lineinfile:
|
|
dest: /.solar_config_override
|
|
line: "solar_db: postgresql://solar:solar@127.0.0.1:5432/solar?solar_pool=True"
|
|
state: present
|
|
create: yes
|