Ian Wienand 403773d55a limnoria/meetbot setup on eavesdrop01.opendev.org
This installs our Limnoira/meetbot container and configures it on
eavesdrop01.opendev.org.  I have ported the configuration from the old
puppet as best I can (it is very verbose); my procedure was to use the
Limnoira wizard to start a new config file then backport everything
from the old file.  I felt this was best to not miss any new options.

This does channel logging (via built-in ChannelLogger plugin, along
with a cron job for logs2html) and runs our fork of meetbot.

It exports the channel logs via HTTP to /irclogs and meetings logs to
/meetings.  meetings.opendev.org will proxy to these two locations
when the server is active.

Note this has not ported the channel list; so the bot will not be
listening in our channels.

Change-Id: I9f9a466c271e1a706f9f98f816de0e84047519f1
2021-06-10 09:02:16 +10:00

73 lines
1.7 KiB
YAML

- name: Ensure /var/lib/limnoria directories
file:
state: directory
path: '/var/lib/{{ item }}'
mode: 0755
loop:
- limnoria
- limnoria/opendev
- name: Put limnoira config in place
template:
src: limnoria.config.j2
dest: /var/lib/limnoria/limnoria.config
owner: root
group: root
mode: 0600
- name: Ensure /var/lib/limnoria/ircmeeting directory
file:
state: directory
path: /var/lib/limnoria/ircmeeting
mode: 0755
- name: Put meetbot local config in place
template:
src: meetingLocalConfig.py.j2
dest: /var/lib/limnoria/ircmeeting/meetingLocalConfig.py
owner: root
group: root
mode: 0600
- name: Ensure /etc/ircbot-docker directory
file:
state: directory
path: /etc/ircbot-docker
mode: 0755
- name: Setup webserver
include_tasks: webserver.yaml
- name: Put docker-compose file in place
copy:
src: docker-compose.yaml
dest: /etc/ircbot-docker/docker-compose.yaml
owner: root
group: root
mode: 0644
- name: 'Install logs2html cron job'
cron:
name: 'opendev {{ item.key }} logs2html'
state: present
user: root
job: >-
/usr/local/bin/docker-compose -f /etc/ircbot-docker/docker-compose.yaml exec -T ircbot
bash -c "find /var/lib/limnoria/opendev/logs/ChannelLogger/{{ item.key }}/ -mindepth 1 -maxdepth 1 -type d | xargs -n1 logs2html"
loop: '{{ limnoria_network_config | dict2items }}'
no_log: True
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/ircbot-docker/
- name: Run docker-compose up
shell:
cmd: "docker-compose up -d"
chdir: /etc/ircbot-docker/
- name: Run docker prune to cleanup unneeded images
shell:
cmd: docker image prune -f