adc/ansible/roles/mattermost/tasks/main.yml

40 lines
1.3 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/mattermost/volumes/app/mattermost/config', '/home/josiah/mattermost/volumes/app/mattermost/data', '/home/josiah/mattermost/volumes/app/mattermost/logs', '/home/josiah/mattermost/volumes/app/mattermost/plugins', '/home/josiah/mattermost/volumes/app/mattermost/client/plugins', '/home/josiah/mattermost/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