vps/playbooks/vps1.yml
2023-09-05 20:27:29 +02:00

36 lines
1 KiB
YAML

---
- name: VPS 1 setup
hosts: vps1
gather_facts: false
tasks:
#####
# 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