No description
Find a file
2026-04-05 22:03:15 +00:00
defaults modernize for common format 2025-01-17 20:07:21 +00:00
meta initial commit for mattermost role 2024-05-20 17:42:51 +00:00
tasks modernize for common format 2025-01-17 20:07:21 +00:00
.gitignore add .gitignore 2026-04-05 22:03:15 +00:00
README.md update readme 2024-05-20 17:48:16 +00:00

ansible-roles-mattermost

This role is designed to deploy mattermost as a standalone podman container

Task Configuration

Define mattermost_url, this will useful in conjunction with a proxy role such as traefik or nginx

Define mattermost_path if the container user has a custom homedir such as something under /srv..

Example deployment

- name: Setup proxy and service
  hosts: somehost
  become: true
  roles:
    - role: mattermost
      mattermost_url: mattermost.somehost.somewhere
    - role: traefik
      mattermost:
        - name: uptime
          host: "{{ mattermost_url }}"
          srv: "{{ traefik_host_address }}:3001"
    - role: firewalld
      firewalld_add:
        - name: public
          services:
            - http
            - https
          forwards:
            - port: 80
              to: 8080
            - port: 443
              to: 8443
            - port: 22
              to: 2222

Customzing mattermost, any options can be set in mattermost_OMNIBUS_CONFIG

mattermost_server_env:
  TZ: UTC
  MM_SQLSETTINGS_DRIVERNAME: "{{ mattermost_db_driver }}"
  MM_SQLSETTINGS_DATASOURCE: "{{ mattermost_db_connect }}"
  MM_BLEVESETTINGS_INDEXDIR: "{{ mattermost_bleve_index }}"
  MM_SERVICESETTINGS_SITEURL: "https://{{ mattermost_url }}"

Deployment and Removal

Sometimes you need to manually stop the running containers to get a clean run when re-deploying Services must be stopped as the respecitve user or another means to aquire the correct user scope for systemd

systemctl --user stop container-traefik.service
systemctl --user stop container-mattermost.service

Deploy

ansible-playbook -i hosts site.yml --tags=firewalld,traefik,mattermost --limit=somehost

Remove

ansible-playbook -i hosts site.yml --tags=firewalld,traefik,mattermost --extra-vars "container_state=absent firewall_action=remove" --limit=somehost