Hugo Peixoto
4c05a03f93
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.
25 lines
551 B
YAML
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
|