add mastodon role

This commit is contained in:
Pim Kunis 2022-12-06 22:20:54 +01:00
parent b1ffc58047
commit c985ffd089
6 changed files with 258 additions and 1 deletions

View file

@ -0,0 +1,22 @@
- name: Create Mastodon app directory
file:
path: /apps/mastodon
state: directory
- name: Copy .env.production
copy:
src: "{{ role_path }}/files/.env.production"
dest: /apps/mastodon/.env.production
- name: Copy Docker Compose script
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: /apps/mastodon/docker-compose.yml
- name: Create Mastodon data directory
file:
path: /data/mastodon
state: directory
mode: 0777
- name: Start Docker Compose
docker_compose:
project_src: /apps/mastodon
pull: true
remove_orphans: true