From b2ca63c3b78bd5286917c6c94d1e1dcfb011555c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 11 Jun 2021 12:01:45 +1000 Subject: [PATCH] limnoria: production fixes Don't flush the config. We don't want limnoria to overwrite our config, and we dont' configure it manually via interaction. Make sure the Services plugin is loaded to identify with nickserv. Set the logs2html job to 15 minutes, same as the old puppet setting. Set the logging level to INFO to avoid verbose logging. Set the flush option to True so logs are written immediately Setup rotation on the logfile Change-Id: I9b5fdf484b6e5d8c9af60708ff02d3c60e427fbd --- playbooks/roles/limnoria/tasks/main.yaml | 7 +++++++ playbooks/roles/limnoria/templates/limnoria.config.j2 | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/limnoria/tasks/main.yaml b/playbooks/roles/limnoria/tasks/main.yaml index 07d2ca42da..41bae620a7 100644 --- a/playbooks/roles/limnoria/tasks/main.yaml +++ b/playbooks/roles/limnoria/tasks/main.yaml @@ -29,6 +29,12 @@ 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 @@ -51,6 +57,7 @@ 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" diff --git a/playbooks/roles/limnoria/templates/limnoria.config.j2 b/playbooks/roles/limnoria/templates/limnoria.config.j2 index 67f140b00f..b94bc33ce1 100644 --- a/playbooks/roles/limnoria/templates/limnoria.config.j2 +++ b/playbooks/roles/limnoria/templates/limnoria.config.j2 @@ -543,7 +543,7 @@ supybot.log.format: %(levelname)s %(asctime)s %(name)s %(message)s # # Default value: INFO ### -supybot.log.level: DEBUG +supybot.log.level: INFO ### # Determines what the bot's logging format will be. The relevant @@ -1726,5 +1726,7 @@ supybot.plugins.MeetBot.public: True supybot.plugins.MeetBot.enableSupybotBasedConfig: False # NickServ +supybot.plugins.Services: True supybot.plugins.Services.NickServ: NickServ +supybot.plugins.Services.NickServ.nicks: {{ limnoria_default_nick }} supybot.plugins.Services.NickServ.password.{{ limnoria_default_nick }}: {{ limnoria_default_nickserv_password }}