ansible/roles/container-postgres/tasks/main.yml
Hugo Peixoto 4c05a03f93 Refaz o saucy
Em vez de usar o comminuty module cenas para docker, usa systemd para
gerir os jobs e env files normais.

Aproveita e renomeia um dos yaml para yml.
2022-10-02 00:10:14 +01:00

25 lines
551 B
YAML

- name: container pg -- srv directory
become: true
file:
path: '/srv/postgres'
mode: 0700
state: directory
- name: container pg -- env file
become: true
template:
src: 'files/env'
dest: '/srv/postgres/env'
mode: 0600
- name: container pg -- systemd unit file
become: true
template:
src: 'files/unit.service'
dest: '/etc/systemd/system/container-postgres.service'
mode: 0644
notify: reload systemd
- name: container pg -- start
become: true
systemd:
name: container-postgres
state: started