1
0
Fork 0
gopoop.org/foundry.yaml

86 lines
2.7 KiB
YAML
Executable File

---
- name: Setup Foundry
hosts: all
vars_files:
- vault.yaml
- vars.yaml
tasks:
- name: Create Foundry data folder
file:
path: /home/server/foundry_data
state: directory
- name: Create Foundry install folder
file:
path: /home/server/foundry_data
state: directory
- name: Send Foundry Container Cache
copy:
src: ./foundry_container_cache
dest: /home/server
- name: Run Foundry
docker_container:
name: "{{ stack_prefix_name }}foundry"
recreate: true
restart_policy: unless-stopped
image: ghcr.io/felddy/foundryvtt:release
hostname: foundry.gopoop.org
init: yes
env:
FOUNDRY_IP_DISCOVERY: "false"
CONTAINER_VERBOSE: "true"
FOUNDRY_ADMIN_KEY: "{{ secret_foundry_admin_key }}"
FOUNDRY_LICENSE_KEY: "{{ secret_foundry_license_key }}"
FOUNDRY_CSS_THEME: "fantasy"
FOUNDRY_VERSION: "11.315"
networks:
- name: "{{ stack_prefix_name }}{{ docker_internal_network }}"
# Foundry needs to talk to the outside world to validate the license.
- name: "{{ stack_prefix_name }}{{ docker_external_network }}"
mounts:
- target: /data
source: /home/server/foundry_data
type: bind
- target: /data/container_cache
source: /home/server/foundry_container_cache
type: bind
state: "{{ container_state }}"
- name: Create Foundry 2 data folder
file:
path: /home/server/foundry_2_data
state: directory
- name: Run Foundry 2
docker_container:
name: "{{ stack_prefix_name }}foundry_2"
recreate: true
restart_policy: unless-stopped
image: ghcr.io/felddy/foundryvtt:release
hostname: foundry2.gopoop.org
init: yes
env:
FOUNDRY_IP_DISCOVERY: "false"
CONTAINER_VERBOSE: "true"
FOUNDRY_ADMIN_KEY: "{{ secret_foundry_2_admin_key }}"
FOUNDRY_LICENSE_KEY: "{{ secret_foundry_2_license_key }}"
FOUNDRY_CSS_THEME: "fantasy"
FOUNDRY_VERSION: "10.291"
networks:
- name: "{{ stack_prefix_name }}{{ docker_internal_network }}"
# Foundry needs to talk to the outside world to validate the license.
- name: "{{ stack_prefix_name }}{{ docker_external_network }}"
mounts:
- target: /data
source: /home/server/foundry_2_data
type: bind
- target: /data/container_cache
source: /home/server/foundry_container_cache
type: bind
state: "{{ container_state }}"