mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
- name: VPS 1 setup
|
|
hosts: vps1
|
|
gather_facts: false
|
|
tasks:
|
|
#####
|
|
# APP: uptime, /apps/uptime
|
|
#####
|
|
- name: Create /apps/uptime
|
|
ansible.builtin.file:
|
|
path: /apps/uptime
|
|
state: directory
|
|
mode: "u=rwx,g=rx,o=rx"
|
|
- name: Copy uptime.json
|
|
ansible.builtin.copy:
|
|
dest: /apps/uptime/uptime.json
|
|
src: ../apps/uptime/uptime.json
|
|
mode: "u=r,g=r,o=r"
|
|
#####
|
|
# APP: openolat, /apps/openolat
|
|
#####
|
|
- name: Create /apps/openolat
|
|
ansible.builtin.file:
|
|
path: /apps/openolat
|
|
state: directory
|
|
mode: "u=rwx,g=rx,o=rx"
|
|
- name: Copy extra properties
|
|
ansible.builtin.copy:
|
|
dest: /apps/openolat/extra-properties.properties
|
|
src: ../apps/openolat/extra-properties.properties
|
|
mode: "u=r,g=r,o=r"
|
|
- name: Olat data file permissions # TODO: a bit hacky.
|
|
ansible.builtin.file:
|
|
path: /apps/openolat/olatdata
|
|
state: directory
|
|
mode: "u=rwx,g=rwx,o=rwx"
|
|
#####
|
|
# END: docker compose up!
|
|
#####
|
|
# We want this to be last so that all app-specific config has been done.
|
|
- name: Copy .env
|
|
ansible.builtin.copy:
|
|
dest: "/apps/.env"
|
|
src: "../secrets/vps1.env"
|
|
mode: "u=r,g=r,o=r"
|
|
- name: Docker compose up! 🚀
|
|
community.docker.docker_compose:
|
|
project_src: /apps
|
|
restarted: true
|