Skip to content
An Officially Unofficial™ Ansible role to install and set up Sopel
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

What is ansible-sopel? Build Status

It is an Ansible role that installs sopel irc bot in a virtual environment.

Supported platforms

  • Ubuntu 16.04 LTS (Xenial)
  • Ubuntu 18.04 LTS (Bionic)
  • Debian 8 (Jessie)
  • Debian 9 (Stretch)
  • CentOS 7

Debian 8 is currently not being tested on travis, as there's an issue with the docker image used for it, however it has been tested successfully on an actual install.

Role variables

# Changing the instance name will allow several instances of Sopel to
# run side-by-side on the same server as long as they have
# different nicks, or connect to different servers.
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
sopel_install_python3: true

# The prefix used to call the bot.
# It's parsed as regex so remember to escape special characters
sopel_command_prefix: '\.'

# The nick sopel will present itself as in channels
sopel_nick: 'sopel_irc_bot'
sopel_auth_method: 'sasl'

# The network sopel should connect to
sopel_irc_host: ''
sopel_irc_port: 6697

# A list of channels to join
  - '##botspam'

# The admin of the bot
sopel_bot_owner: ''

# A list of nicks and hostmasks for sopel to ignore. Parsed as regex
  - ''
  - ''

# A list of plugins to enable. Default is everything enabled
#sopel_enabled_plugins: []

# A list of plugins to exclude. Default is none excluded
#sopel_excluded_plugins: []

## Any further additions to the sopel config can be added through this variable
## it is appended to the end of the config
#sopel_config_extra: |
#  [currency]
#  auto_convert = true

# Default timezone and time format. for format info
sopel_timezone: 'Europe/Copenhagen'
sopel_time_format: '[%Y-%m-%d - %T %Z]'

Example usage

Example showing how to quickly and easily deploy two instances of sopel This will set up two sopel instances, one with the default name sopel and one called sopel2 It'll also install them as systemd services under the names: sopel-sopel and sopel-sopel2 the config files will be found in /etc/sopel/

- name: 'Install Sopel instance 1'
  hosts: vps
  become: true
    - sopel

    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

   - sopel.sopel

- name: 'Install Sopel instance 2'
  hosts: vps
  become: true
    - sopel

    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

    - sopel.sopel


$ ansible-galaxy install sopel.sopel

Ansible Galaxy

You can find it on the official Ansible Galaxy if you want to rate it.



You can’t perform that action at this time.