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

32 lines
725 B
YAML
Raw Normal View History

2021-02-03 10:43:08 -05:00
---
- name: Start postgres container
become: yes
2021-02-03 10:43:08 -05:00
docker_container:
name: postgres
image: postgres:13.1
state: started
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
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
file:
src: "/srv/newsblur/utils/monitor_disk_usage.py"
dest: "/etc/cron.daily/monitor_disk_usage"
state: link