57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
---
|
|
# Setup users etc
|
|
- name: create the mastodon user account
|
|
user:
|
|
name: mastodon
|
|
shell: /bin/bash
|
|
group: docker
|
|
|
|
- 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
|
|
template:
|
|
src: statsd-mapping.yaml.j2
|
|
dest: /root/statsd-mapping.yml
|
|
|
|
- name: Install .env.production file
|
|
template:
|
|
src: env.production.j2
|
|
dest: /home/mastodon/live/.env.production
|
|
|
|
- name: Install docker-compose.sh file
|
|
template:
|
|
src: docker-compose.sh.j2
|
|
dest: /usr/local/bin/docker-compose.sh
|
|
|
|
- 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
|
|
notify: "docker-compose up"
|
|
|
|
- name: Install feed rebuild script
|
|
template:
|
|
src: feeds-build.sh.j2
|
|
dest: /usr/local/bin/feeds-build.sh
|
|
|
|
- name: Set permission of feeds-build.sh
|
|
file:
|
|
path: /usr/local/bin/feeds-build.sh
|
|
mode: '0755'
|
|
|
|
- import_tasks: redis.yml
|
|
when: ansible_hostname == REDIS_HOST
|
|
|
|
- import_tasks: maintenance.yml
|
|
when: ansible_hostname == MAINTENANCE_HOST
|