ansible/roles/container-saucy/tasks/main.yml

37 lines
907 B
YAML
Raw Permalink Normal View History

- 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"