1fe40b507a
Correct the cronjob for the log prettifier to run every 15 minutes instead of on the 15th minute. Change-Id: Id738a5d793e22f4253461e0bf45bb222fd2a31ab
80 lines
1.9 KiB
YAML
80 lines
1.9 KiB
YAML
- name: Ensure /var/lib/limnoria directories
|
|
file:
|
|
state: directory
|
|
path: '/var/lib/{{ item }}'
|
|
mode: 0755
|
|
loop:
|
|
- limnoria
|
|
- limnoria/opendev
|
|
|
|
- name: Put limnoria 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: Rotate limnoria logfile
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: /var/lib/limnoria/opendev/logs/messages.log
|
|
|
|
- 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
|
|
minute: '*/15'
|
|
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
|