diff options
author | Pedro Alvarez Piedehierro <pedro@alvarezpiedehierro.com> | 2022-05-17 10:45:12 +0000 |
---|---|---|
committer | Pedro Alvarez Piedehierro <pedro@alvarezpiedehierro.com> | 2022-05-17 10:45:12 +0000 |
commit | d278c684631b39c6bc0333b2ff9a66e6a330a057 (patch) | |
tree | d2b7a209594cc4b17c361dc77aefc3699ed45cc1 | |
parent | 71091d727bdf1a78193d5586864cde544832be1c (diff) | |
parent | cdc52bb8afc75f52793fd6ca45b761b4aeab4765 (diff) | |
download | infrastructure-master.tar.gz |
Disable MeetBot
See merge request baserock/infrastructure!65
-rw-r--r-- | baserock_webserver/instance-irclogs-config.yml | 77 | ||||
-rw-r--r-- | baserock_webserver/irclogs/irclogs-generation.service | 12 | ||||
-rw-r--r-- | baserock_webserver/irclogs/meetingLocalConfig.py | 17 | ||||
-rw-r--r-- | baserock_webserver/irclogs/supybot-baserock.conf | 63 |
4 files changed, 39 insertions, 130 deletions
diff --git a/baserock_webserver/instance-irclogs-config.yml b/baserock_webserver/instance-irclogs-config.yml index f050d5ff..cab32602 100644 --- a/baserock_webserver/instance-irclogs-config.yml +++ b/baserock_webserver/instance-irclogs-config.yml @@ -11,37 +11,7 @@ become: yes become_user: root - - name: Check for MeetBot install - stat: - path: /usr/local/lib/python2.7/dist-packages/supybot/plugins/MeetBot - register: meetbot - - - name: Install MeetBot - block: - - git: - repo: 'https://opendev.org/opendev/meetbot.git' - dest: /tmp/meetbot - version: 01e051648c2759c03f2a907552af8e4410abcde9 - - command: mv /tmp/meetbot/ircmeeting /tmp/meetbot/MeetBot/ - args: - creates: /tmp/meetbot/Meetbot/ircmeeting - - synchronize: - src: /tmp/meetbot/MeetBot - dest: /usr/local/lib/python2.7/dist-packages/supybot/plugins - delegate_to: "{{ inventory_hostname }}" - become: yes - become_user: root - when: not meetbot.stat.exists - - - name: MeetBot configuration - copy: - src: irclogs/meetingLocalConfig.py - dest: /usr/local/lib/python2.7/dist-packages/supybot/plugins/MeetBot/ircmeeting/meetingLocalConfig.py - become: yes - become_user: root - - - - name: Install Supybot from pip + - name: Install irclog2html from pip3 pip: name: irclog2html executable: pip3 @@ -62,15 +32,6 @@ become: yes become_user: root - - name: supybot configuration - template: - src: "irclogs/supybot-baserock.conf" - dest: "/home/supybot/supybot-baserock.conf" - owner: supybot - group: supybot - become: yes - become_user: root - - name: install systemd units copy: src: ./irclogs/{{item}} @@ -82,6 +43,35 @@ - irclogs-generation.timer - supybot.service + - name: check if there are supybot configuration changes + template: + src: "irclogs/supybot-baserock.conf" + dest: "/home/supybot/supybot-baserock.conf" + owner: supybot + group: supybot + become: yes + become_user: root + check_mode: yes + register: supybot_config + + - name: update supybot configuration + block: + - name: stop supybot + service: + name: supybot + state: stopped + notify: start supybot + + - name: supybot configuration + template: + src: "irclogs/supybot-baserock.conf" + dest: "/home/supybot/supybot-baserock.conf" + owner: supybot + group: supybot + become: yes + become_user: root + when: supybot_config.changed + - name: enable systemd units systemd: name: "{{item}}" @@ -94,3 +84,10 @@ - irclogs-generation.service - irclogs-generation.timer - supybot.service + + handlers: + - name: start supybot + service: + name: supybot + state: started + become: yes diff --git a/baserock_webserver/irclogs/irclogs-generation.service b/baserock_webserver/irclogs/irclogs-generation.service index 12f0dc40..57902236 100644 --- a/baserock_webserver/irclogs/irclogs-generation.service +++ b/baserock_webserver/irclogs/irclogs-generation.service @@ -8,23 +8,11 @@ User=supybot ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #baserock' -p 'IRC logs for #baserock for ' /home/supybot/logs/ChannelLogger/libera/#baserock/ ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/libera/\#baserock/*html /home/supybot/logs/ChannelLogger/libera/\#baserock/*css /srv/irclogs.baserock.org/" -ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #automotive' -p 'IRC logs for #automotive for ' /home/supybot/logs/ChannelLogger/freenode/#automotive/ -ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/freenode/\#automotive/*html /home/supybot/logs/ChannelLogger/freenode/\#automotive/*css /srv/irclogs.baserock.org/automotive" - ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #cip' -p 'IRC logs for #cip for ' /home/supybot/logs/ChannelLogger/libera/#cip/ ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/libera/\#cip/*html /home/supybot/logs/ChannelLogger/libera/\#cip/*css /srv/irclogs.baserock.org/cip" -ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #trustable' -p 'IRC logs for #trustable for ' /home/supybot/logs/ChannelLogger/freenode/#trustable/ -ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/freenode/\#trustable/*html /home/supybot/logs/ChannelLogger/freenode/\#trustable/*css /srv/irclogs.baserock.org/trustable" - ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #buildstream' -p 'IRC logs for #buildstream for ' /home/supybot/logs/ChannelLogger/gimp/#buildstream/ ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/gimp/\#buildstream/*html /home/supybot/logs/ChannelLogger/gimp/\#buildstream/*css /srv/irclogs.baserock.org/buildstream" -ExecStart=/usr/local/bin/logs2html -t 'IRC logs for #freedesktop-sdk' -p 'IRC logs for #freedesktop-sdk for ' /home/supybot/logs/ChannelLogger/freenode/#freedesktop-sdk/ -ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/logs/ChannelLogger/freenode/\#freedesktop-sdk/*html /home/supybot/logs/ChannelLogger/freenode/\#freedesktop-sdk/*css /srv/irclogs.baserock.org/freedesktop-sdk" - -ExecStart=/bin/sh -c "/usr/bin/rsync -a /home/supybot/meetings /srv/irclogs.baserock.org/" - - [Install] WantedBy=multi-user.target diff --git a/baserock_webserver/irclogs/meetingLocalConfig.py b/baserock_webserver/irclogs/meetingLocalConfig.py deleted file mode 100644 index a4a2b534..00000000 --- a/baserock_webserver/irclogs/meetingLocalConfig.py +++ /dev/null @@ -1,17 +0,0 @@ -# Richard Darst, July 2009 -# -# Minimal meetingLocalConfig.py -# -# This file is released into the public domain, or released under the -# supybot license in areas where releasing into the public domain is -# not possible. -# - -class Config(object): - # These are "required": - logFileDir = '/home/supybot/meetings/' - logUrlPrefix = 'https://irclogs.baserock.org/meetings/' - - # These, you might want to change: - #MeetBotInfoURL = 'http://wiki.debian.org/MeetBot' - filenamePattern = '%(channel)s/%%Y/%%m/%(channel)s.%%F-%%H.%%M' diff --git a/baserock_webserver/irclogs/supybot-baserock.conf b/baserock_webserver/irclogs/supybot-baserock.conf index 7ca7b5b4..890d5bf5 100644 --- a/baserock_webserver/irclogs/supybot-baserock.conf +++ b/baserock_webserver/irclogs/supybot-baserock.conf @@ -38,47 +38,7 @@ supybot.user: # # Default value: ### -supybot.networks: freenode gimp libera - -### -# Determines what password will be used on freenode. Yes, we know that -# technically passwords are server-specific and not network-specific, -# but this is the best we can do right now. -# -# Default value: -### -supybot.networks.freenode.password: {{ brlogger_bot_password }} - -### -# Determines what servers the bot will connect to for freenode. Each -# will be tried in order, wrapping back to the first when the cycle is -# completed. -# -# Default value: -### -supybot.networks.freenode.servers: chat.freenode.com:6667 - -### -# Determines what channels the bot will join only on freenode. -# -# Default value: -### -supybot.networks.freenode.channels: #automotive #trustable #freedesktop-sdk - -### -# Determines what key (if any) will be used to join the channel. -# -# Default value: -### -supybot.networks.freenode.channels.key: - -### -# Determines whether the bot will attempt to connect with SSL sockets to -# freenode. -# -# Default value: False -### -supybot.networks.freenode.ssl: False +supybot.networks: gimp libera ### # Determines what password will be used on libera. Yes, we know that @@ -745,7 +705,7 @@ supybot.directories.log: /home/supybot/logs # # Default value: ### -supybot.plugins: MeetBot Admin ChannelLogger Misc User Owner Config Channel +supybot.plugins: Admin ChannelLogger Misc User Owner Config Channel ### # Determines whether this plugin is loaded by default. @@ -910,25 +870,6 @@ supybot.plugins.Config.public: True ### # Determines whether this plugin is loaded by default. ### -supybot.plugins.MeetBot: True - -### -# Determines whether this plugin is publicly visible. -# -# Default value: True -### -supybot.plugins.MeetBot.public: True - -### -# Enable configuration via the supybot config mechanism. -# -# Default value: False -### -supybot.plugins.MeetBot.enableSupybotBasedConfig: False - -### -# Determines whether this plugin is loaded by default. -### supybot.plugins.Misc: True ### |