Ansible Role rocketchat
This role installs and configures Rocket.Chat, an Open-Source Chat system, as a Podman container.
Mandatory Requirements
On RHEL-compatible systems, enable the EPEL repository. This can be done using the linuxfabrik.lfops.repo_epel role.
Enable the MongoDB repository. This can be done using the linuxfabrik.lfops.repo_mongodb role.
Install MongoDB and configure a replica set. This can be done using the linuxfabrik.lfops.mongodb role.
Create a MongoDB user for Rocket.Chat. Mandatory when authentication in MongoDB is enabled. This can be done using the linuxfabrik.lfops.mongodb role.
If you use the „Setup Rocket.Chat“ Playbook, this is automatically done for you (you still have to take care of providing the required versions).
Make sure the container can access the MongoDB instance:
mongodb__conf_net_bind_ip:
- 'localhost'
- 'fqdn.example.com' # allow access from container. make sure the DNS entry (or /etc/hosts) points to the correct ip (not 127.)
mongodb__repl_set_members:
- 'fqdn.example.com' # else the client gets redirected to localhost, which does not work from inside the container
Optional Requirements
It is recommended to set
Storage=presistent
in/etc/systemd/journald.conf
to allow the user to usejournalctl --user
. This can be done using the linuxfabrik.lfops.systemd_journald role.If the host should act as a Postfix MTA, make sure it is listening on the IP address so that the container can reach it. This can be done using the linuxfabrik.lfops.systemd_journald role.
Mandatory Role Variables
Variable |
Description |
---|---|
|
The user account for accessing the MongoDB database. Mandatory when authentication in MongoDB is enabled. |
|
The URL on which the Rocket.Chat server will be available. |
Example:
# mandatory
rocketchat__mongodb_login:
username: 'rocketchat'
password: 'linuxfabrik'
rocketchat__root_url: 'https://rocketchat.example.com'
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
Enables or disables the service, analogous to |
|
|
Changes the state of the service, analogous to |
|
|
The host on which MongoDB is reachable. |
|
|
The port on which MongoDB is reachable. |
|
|
The name of the MongoDB replica set for Rocket.Chat. |
|
|
The port on which Rocket.Chat server will be available. |
|
|
The home directory of the user running Rocket.Chat. |
|
|
Which Rocket.Chat version to install. Have a at the available releases. |
|
Example:
# optional
rocketchat__container_enabled: true
rocketchat__container_state: 'started'
rocketchat__mongodb_host: 'localhost'
rocketchat__mongodb_port: 27017
rocketchat__mongodb_repl_set_name: 'rs01'
rocketchat__port: 3000
rocketchat__user_home_directory: /opt/Rocket.Chat
rocketchat__version: 'latest'