galaxy-o2m/tasks/main.yml

34 lines
855 B
YAML

---
# tasks file for galaxy-o2m
- name: Ensure o2m data dir
file:
path: "{{ o2m_base }}"
state: directory
- name: Ensure o2m dets subdir
file:
path: "{{ o2m_base }}/{{ item }}"
state: directory
owner: "{{ o2m_dets_uid }}"
group: "{{ o2m_dets_gid }}"
with_items:
- "{{ o2m_name }}"
- "{{ o2m_name }}/dets"
- name: Ensure o2m (service)
docker_container:
name: o2m-{{ o2m_name }}
image: papey/o2m:{{ o2m_version }}
pull: yes
state: started
env:
DISCORD_TOKEN: "{{ o2m_discord_token }}"
O2M_FEED_URLS: "{{ o2m_feed_urls }}"
O2M_NICKNAME: "{{ o2m_nickname }}"
O2M_GUILD_ID: "{{ o2m_guild_id }}"
O2M_CHAN_ID: "{{ o2m_chan_id }}"
O2M_JOBS_TIMER: "{{ o2m_timer }}"
restart_policy: always
volumes:
- "{{ o2m_base }}/{{ o2m_name }}/dets:/opt/o2m/dets"