pieterlexis.mattermost
Mattermost
This is a role that sets up and configures Mattermost.
The role ensures a secure installation of Mattermost by placing it in /opt/mattermost
and restricting the mattermost user from editing files in that folder. Uploaded files are stored in /srv/mattermost
, and the configuration file is not writable by default.
Requirements
You need Ansible version 2.0 or higher and the pieterlexis.json_file module.
Role Variables
Here are the available options and their default values (check defaults/main.yml
):
mattermost_version
: 4.3.1
This is the version of Mattermost to install. The checksum for the tarball is pulled from the_mattermost_versions
variable but can be changed usingmattermost_tar_checksum
.
This role installs Mattermost to /opt/mattermost/{{ mattermost_version }}
and creates a symlink named /opt/mattermost/current
to this directory, making upgrades and downgrades easier.
mattermost_listen_address
: '127.0.0.1:8065'
This is the address and port where Mattermost will listen for connections.Database-related settings:
mattermost_database_driver
: postgresmattermost_database_host
: localhostmattermost_database_name
: mattermostmattermost_database_user
: mattermostmattermost_database_password
: (leave empty for now)
Only the "postgresql" driver is supported currently.
mattermost_database_create
: true
This option creates the database and user, but only if the database is on localhost.User and group settings for Mattermost:
mattermost_user_create
: truemattermost_user
: mattermostmattermost_group_create
: truemattermost_group
: mattermost
These options determine whether to create the user and group for running Mattermost.
mattermost_config_writable
: false
This controls whether the mattermost configuration file can be modified by themattermost_user
. Setting it totrue
allows system admins to change settings, while the default setting restricts changes to those running Ansible.mattermost_config
: []
This is a list of configuration settings and their values. For more details, refer to thejson_file
documentation and the example playbook below.
Dependencies
Example Playbook
- hosts: servers
roles:
- { role: pieterlexis.mattermost,
mattermost_config: [
{ key: 'EmailSettings.FeedbackEmail', value: '[email protected]' },
{ key: 'EmailSettings.FeedbackName', value: 'Example.com Inc. Mattermost' },
{ key: 'EmailSettings.RequireEmailVerification', value: true },
{ key: 'EmailSettings.SMTPPort', value: "25", as_string: yes },
{ key: 'EmailSettings.SMTPServer', value: 'localhost' },
{ key: 'EmailSettings.SendEmailNotifications', value: true }],
mattermost_database_host: 'db1.example.com',
mattermost_database_password: 'Ex4mpl3' }
License
MIT
Author Information
- Pieter Lexis
ansible-galaxy install pieterlexis.mattermost