adc/ansible/roles/mattermost/tasks/main.yml
josiah ece64af0ed Test mattermost.
- Add new DO records
- Create TF for provisioning mm virtual machine inside bikeshed
- write basic ansible play for deploying single node chat cluster.
2024-05-26 15:47:32 -05:00

40 lines
1.2 KiB
YAML

---
# git clone my repo
# set up secrets here in ansible
# replace env file with custom env file that references secrets
# bobs your uncle?
- name: Pull down the latest update from fork
git:
repo: 'https://git.awful.club/jowj/mattermost-docker.git'
dest: /home/josiah/mattermost/
version: main
- name: copy over my custom env file
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0777
with_items:
- {src: 'env.j2', dest: '/home/josiah/mattermost/.env'}
# i'm not setting owner/group here and might need to
- name: ensure the required MM directories exist
file:
state: directory
path: "{{ item }}"
owner: 2000
group: 2000
mode: 0700
recurse: yes
with_items:
[ '/home/josiah/volumes/app/mattermost/config', '/home/josiah/volumes/app/mattermost/data', '/home/josiah/volumes/app/mattermost/logs', '/home/josiah/volumes/app/mattermost/plugins', '/home/josiah/volumes/app/mattermost/client/plugins', '/home/josiah/volumes/app/mattermost/bleve-indexes' ]
- name: Deploy mattermost with compose
docker_compose:
project_src: "/home/josiah/mattermost"
project_name: mm
files:
- docker-compose.yml
- docker-compose.without-nginx.yml
#- docker-compose.nginx.yml