No description
| defaults | ||
| meta | ||
| tasks | ||
| .gitignore | ||
| README.md | ||
ansible-roles-mattermost
This role is designed to deploy mattermost as a standalone podman container
- https://docs.mattermost.com/
- https://github.com/mattermost/docker/
- https://hub.docker.com/u/mattermost/
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