58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
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) with blind tests
|
|
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 }}"
|
|
O2M_BT_ADMIN: "{{ o2m_bt_admin }}"
|
|
O2M_BT_CHAN_ID: "{{ o2m_bt_chan_id }}"
|
|
O2M_BT_VOCAL_ID: "{{ o2m_bt_vocal_id }}"
|
|
restart_policy: always
|
|
volumes:
|
|
- "{{ o2m_base }}/{{ o2m_name }}/dets:/opt/o2m/dets"
|
|
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:
|
|
- "{{ o2m_base }}/{{ o2m_name }}/dets:/opt/o2m/dets"
|
|
when: not o2m_blind_test
|