galaxy-o2m/tasks/main.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

2020-07-02 07:26:49 +00:00
---
# 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"
2020-12-25 20:46:16 +00:00
- name: Ensure o2m (service) with blind tests
2020-07-02 07:26:49 +00:00
docker_container:
name: o2m-{{ o2m_name }}
image: papey/o2m:{{ o2m_version }}
pull: yes
state: started
env:
DISCORD_TOKEN: "{{ o2m_discord_token }}"
2020-12-25 20:46:16 +00:00
DISCORD_GW_INTENTS: "{{ o2m_discord_gw_intents }}"
2020-07-02 07:26:49 +00:00
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 }}"
2020-12-25 20:46:16 +00:00
O2M_BT_ADMIN: "{{ o2m_bt_admin }}"
O2M_BT_CHAN_ID: "{{ o2m_bt_chan_id }}"
O2M_BT_VOCAL_ID: "{{ o2m_bt_vocal_id }}"
2020-07-02 07:26:49 +00:00
restart_policy: always
volumes:
2021-02-13 13:40:23 +00:00
- "{{ o2m_base }}/{{ o2m_name }}/dets:/srv/o2m/dets"
2020-12-25 20:46:16 +00:00
when: o2m_blind_test
- name: Ensure o2m (service) without blind test
docker_container:
name: o2m-{{ o2m_name }}
image: papey/o2m:{{ o2m_version }}
pull: yes
state: started
env:
DISCORD_TOKEN: "{{ o2m_discord_token }}"
DISCORD_GW_INTENTS: "{{ o2m_discord_gw_intents }}"
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:
2021-02-13 14:03:48 +00:00
- "{{ o2m_base }}/{{ o2m_name }}/dets:/srv/o2m/dets"
2020-12-25 20:46:16 +00:00
when: not o2m_blind_test