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.
37 lines
907 B
YAML
37 lines
907 B
YAML
- name: container saucy -- srv directory
|
|
become: true
|
|
file:
|
|
path: '/srv/saucy'
|
|
mode: 0700
|
|
state: directory
|
|
- name: container saucy -- env file
|
|
become: true
|
|
template:
|
|
src: 'files/env'
|
|
dest: '/srv/saucy/env'
|
|
mode: 0600
|
|
- name: container saucy -- systemd unit file
|
|
become: true
|
|
template:
|
|
src: 'files/unit.service'
|
|
dest: '/etc/systemd/system/container-saucy.service'
|
|
mode: 0644
|
|
notify: reload systemd
|
|
- name: container saucy -- start
|
|
become: true
|
|
systemd:
|
|
name: container-saucy
|
|
state: started
|
|
- name: container saucy -- sync cron
|
|
become: true
|
|
cron:
|
|
name: "saucy-sync"
|
|
minute: "*/5"
|
|
job: "/usr/bin/docker exec -it saucy bin/rails saucy:sync"
|
|
#- name: container saucy -- sync cron
|
|
# become: true
|
|
# cron:
|
|
# name: "saucy-sync"
|
|
# hour: "8"
|
|
# job: "/usr/bin/docker exec -it saucy bin/rails saucy:notify"
|