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
This commit is contained in:
51
foundry_playbook.yml
Normal file
51
foundry_playbook.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- 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'
|
||||
Reference in New Issue
Block a user