mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-13 23:57:09 +00:00
fix(postgresql): change tags for some initializing tasks
When building an image, having those tasks in prepare would result in the DB being initialized with a password, which would then be the same on each host the image is rolled out to. This commit prevents that from happening, the DB itself is initialized in the deploy stage.
This commit is contained in:
parent
724399522c
commit
1715103831
1 changed files with 3 additions and 3 deletions
|
@ -37,15 +37,15 @@
|
|||
env:
|
||||
POSTGRES_PASSWORD: "{{ postgresql_superuser_password }}"
|
||||
register: postgresql_container
|
||||
tags: [ 'prepare', 'prepare-postgresql' ]
|
||||
tags: [ 'deploy', 'deploy-postgresql' ]
|
||||
|
||||
- name: Wait for container to be initialized
|
||||
wait_for:
|
||||
path: "{{ postgresql_socket_path }}/.s.PGSQL.5432"
|
||||
tags: [ 'prepare', 'prepare-postgresql' ]
|
||||
tags: [ 'deploy', 'deploy-postgresql' ]
|
||||
|
||||
- name: Stop initialized container
|
||||
community.docker.docker_container:
|
||||
name: "{{ postgresql_container_name }}"
|
||||
state: absent
|
||||
tags: [ 'prepare', 'prepare-postgresql' ]
|
||||
tags: [ 'deploy', 'deploy-postgresql' ]
|
||||
|
|
Loading…
Reference in a new issue