2021-02-03 10:43:08 -05:00
|
|
|
---
|
|
|
|
- name: Start postgres container
|
2021-02-23 18:37:56 -05:00
|
|
|
become: yes
|
2021-02-03 10:43:08 -05:00
|
|
|
docker_container:
|
|
|
|
name: postgres
|
|
|
|
image: postgres:13.1
|
|
|
|
state: started
|
2021-03-02 10:42:25 -05:00
|
|
|
hostname: postgres
|
2021-02-03 10:43:08 -05:00
|
|
|
env:
|
|
|
|
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
|
2021-02-23 19:30:28 -05:00
|
|
|
tags: consul
|
2021-02-15 19:13:23 -05:00
|
|
|
become: yes
|
|
|
|
template:
|
|
|
|
src: consul_service.json
|
|
|
|
dest: /etc/consul.d/postgres.json
|
|
|
|
notify:
|
|
|
|
- reload consul
|
2021-06-07 15:44:59 -04:00
|
|
|
|
|
|
|
- name: Link disk usage sanity checker
|
|
|
|
become: yes
|
2021-06-07 16:30:51 -04:00
|
|
|
file:
|
|
|
|
src: "/srv/newsblur/utils/monitor_disk_usage.py"
|
|
|
|
dest: "/etc/cron.daily/monitor_disk_usage"
|
|
|
|
state: link
|