Files

70 lines
1.4 KiB
YAML

---
# Setup users etc
- name: create the mastodon user account
user:
name: mastodon
shell: /bin/bash
group: docker
tags:
- install
- name: Check if mastodon repo checked out
stat: path=/home/mastodon/live
register: p
- import_tasks: repo.yml
when: not p.stat.exists
- name: Install statsd mapper
copy:
src: statsd-mapping.yaml
dest: /root/statsd-mapping.yml
tags:
- install
- name: Install .env.production file
template:
src: env.production.j2
dest: /home/mastodon/live/.env.production
tags:
- configure
- name: Install docker-compose.sh file
copy:
src: docker-compose.sh
dest: /usr/local/bin/docker-compose.sh
tags:
- install
- name: Set permissions of docker-compose.sh
file:
path: /usr/local/bin/docker-compose.sh
mode: '0755'
- name: Install docker-compose.yml file
template:
src: docker-compose.yml.j2
dest: /home/mastodon/live/docker-compose.yml
tags:
- configure
notify: "docker-compose up"
- name: Install feed rebuild script
template:
src: feeds-build.sh.j2
dest: /usr/local/bin/feeds-build.sh
tags:
- install
- name: Set permission of feeds-build.sh
file:
path: /usr/local/bin/feeds-build.sh
mode: '0755'
- name: Configure redis
import_tasks: redis.yml
when: RUN_REDIS is defined and RUN_REDIS
- import_tasks: maintenance.yml
when: RUN_CRONS is defined and RUN_CRONS