sopel.sopel
已弃用。此角色不再维护。推荐使用非官方的官方docker镜像替代。
如果有人想接手维护这个项目,请打开一个问题,我们会解决。 问题主要与持续集成相关。
什么是 ansible-sopel? 
这是一个Ansible角色,用于在虚拟环境中安装 sopel irc 机器人。
支持的平台
- Ubuntu 18.04 LTS (Bionic)
- Ubuntu 20.04 LTS (Focal)
- Debian 9 (Stretch)
- Debian 10 (Buster)
- CentOS 7
- CentOS 8
依赖项
- Python 3
- Python venv
- Python wheel 或构建工具
角色变量
---
# 更改实例名称将允许多个 Sopel 实例
# 在同一服务器上并行运行,只需它们具有
# 不同的昵称,或连接到不同的服务器。
sopel_instance_name: 'sopel'
sopel_install_dir: '/srv/sopel'
sopel_config_dir: '/etc/sopel'
sopel_log_dir: '/var/log/sopel'
sopel_pid_dir: '/run/sopel'
sopel_install_systemd_service: true
sopel_start_systemd_service: true
# 如果系统使用不同的虚拟环境包装器,可以覆盖 venv 命令
sopel_venv_cmd: '/usr/bin/python3 -m venv'
# 调用机器人的前缀。
# 这是正则表达式,因此请记得转义特殊字符
sopel_command_prefix: '\.'
# sopel 在频道中呈现的昵称
sopel_nick: 'sopel_irc_bot'
sopel_auth_method: 'sasl'
# sopel 应连接的网络
sopel_irc_host: 'chat.freenode.org'
sopel_irc_port: 6697
# 要加入的频道列表
sopel_channels:
- '##botspam'
# 机器人的管理员
sopel_bot_owner: ''
# sopel 要忽略的昵称和主机掩码列表。按正则表达式解析
sopel_ignored_nicks:
- ''
sopel_ignored_hosts:
- ''
# 要启用的插件列表。默认是启用所有插件
#sopel_enabled_plugins: []
# 要排除的插件列表。默认是没有排除的
#sopel_excluded_plugins: []
## 可以通过此变量添加其他 sopel 配置
## 它将附加到配置末尾
#sopel_config_extra: |
# [currency]
# auto_convert = true
# 默认时区和时间格式。有关格式信息,请访问 http://strftime.org/
sopel_timezone: 'Europe/Copenhagen'
sopel_time_format: '[%Y-%m-%d - %T %Z]'
示例用法
示例展示了如何快速轻松地部署两个 sopel 实例 这将设置两个 sopel 实例,一个名为 sopel,另一个名为 sopel2 它还将它们安装为名为 sopel-sopel 和 sopel-sopel2 的 systemd 服务 配置文件将在 /etc/sopel/ 中找到
---
- name: '安装 Sopel 实例 1'
hosts: vps
become: true
tags:
- sopel
vars:
sopel_auth_method: 'nickserv'
sopel_bot_owner: 'testManDan'
sopel_nick: Sopel_bot_1
sopel_auth_user: NICK OWNER HERE
sopel_auth_pass: NICK PASS HERE
roles:
- sopel.sopel
- name: '安装 Sopel 实例 2'
hosts: vps
become: true
tags:
- sopel
vars:
sopel_instance_name: 'sopel2'
sopel_auth_method: 'nickserv'
sopel_bot_owner: 'testManDan'
sopel_nick: Sopel_bot_2
sopel_auth_user: NICK OWNER HERE
sopel_auth_pass: NICK PASS HERE
roles:
- sopel.sopel
安装
$ ansible-galaxy install sopel.sopel
Ansible Galaxy
如果您想对其评分,可以在官方 Ansible Galaxy 上找到它。
许可证
MIT
感谢 Geerlingguy 提供优秀的 ansible CI 文档。CI 是基于他的工作进行调整的。