NewsBlur/ansible/roles/postgres/tasks/main.yml

25 lines
526 B
YAML
Raw Normal View History

2021-02-03 10:43:08 -05:00
---
- name: Start postgres container
docker_container:
name: postgres
image: postgres:13.1
state: started
env:
DOCKERBUILD: "True"
POSTGRES_USER: newsblur
POSTGRES_PASSWORD: newsblur
restart_policy: unless-stopped
ports:
- '5432:5432'
volumes:
- /srv/newsblur/docker/volumes/postgres:/var/lib/postgresql/data
2021-02-15 19:13:23 -05:00
- name: Register postgres in consul
become: yes
template:
src: consul_service.json
dest: /etc/consul.d/postgres.json
notify:
- reload consul