Files
foundry-vtt-config/foundry_playbook.yml
David Underwood ca55c88ac4 Adds ansible playbook for foundry setup
Currently, running the playbook will:
- Install dependencies (Caddy, nodejs, unzip)
- Create a foundry user
- Extract foundry app into folder on server
- Update Caddyfile with reverse proxt config

TODO:
- unit file for foundry itself
- data directory
2021-03-10 11:48:54 -05:00

52 lines
1.3 KiB
YAML

---
- name: Fountry VTT installation
hosts: all
remote_user: root
vars_files:
- ./variables.yml
environment:
DATA_DIRECTORY: /home/foundry/data
tasks:
- name: Apt repos
shell: |
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
- name: Dependencies
apt:
update_cache: yes
pkg:
- unzip
- nodejs
- caddy
- name: Foundry group
group:
name: foundry
state: present
- name: Foundry user
user:
name: foundry
group: foundry
shell: /bin/bash
- name: Foundry install directory
file:
path: /home/foundry/foundry_app
state: directory
owner: foundry
group: foundry
mode: '0644'
- name: Foundry archive
unarchive:
src: ./foundryvtt.zip
dest: /home/foundry/foundry_app
owner: foundry
group: foundry
mode: '0644'
- name: Caddyfile
template:
src: ./Caddyfile.j2
dest: /etc/caddy/Caddyfile
owner: root
group: root
mode: '0644'