mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
82 lines
2.3 KiB
YAML
82 lines
2.3 KiB
YAML
---
|
|
- name: Generic setup
|
|
ansible.builtin.import_playbook: ./basic-setup.yml
|
|
- name: VPS 2 setup
|
|
hosts: vps2
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Install htpasswd
|
|
ansible.builtin.apt:
|
|
name: apache2-utils
|
|
#####
|
|
# APP: docker registry, /apps/registry
|
|
#####
|
|
- name: Create /apps/registry
|
|
ansible.builtin.file:
|
|
path: /apps/registry
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
- name: Create /apps/registry/data
|
|
ansible.builtin.file:
|
|
path: /apps/registry/data
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
- name: Copy over registry config.yml
|
|
ansible.builtin.copy:
|
|
dest: /apps/registry/config.yml
|
|
src: ../apps/registry/config.yml
|
|
mode: u=r,g=r,o=r # readonly
|
|
#####
|
|
# APP: widetom, /apps/widetom
|
|
#####
|
|
- name: Create /apps/widetom
|
|
ansible.builtin.file:
|
|
path: /apps/widetom
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
#####
|
|
# APP: killua bot, /apps/killua
|
|
#####
|
|
- name: Create /apps/killua
|
|
ansible.builtin.file:
|
|
path: /apps/killua
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
#####
|
|
# APP: karin bot, /apps/karin-bot
|
|
#####
|
|
- name: Create /apps/karin-bot
|
|
ansible.builtin.file:
|
|
path: /apps/karin-bot
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
#####
|
|
# APP: cors-school, /apps/cors-school
|
|
#####
|
|
- name: Create /apps/cors-school
|
|
ansible.builtin.file:
|
|
path: /apps/cors-school
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
#####
|
|
# APP: bisect-rustc-servce, /apps/bisect-rustc-service
|
|
#####
|
|
- name: Create /apps/bisect-rustc-service
|
|
ansible.builtin.file:
|
|
path: /apps/bisect-rustc-service
|
|
state: directory
|
|
mode: u=rwx,g=rx,o=rx
|
|
- name: SQLite DB permissions for bisect-rustc-servce
|
|
ansible.builtin.file:
|
|
path: /apps/bisect-rustc-service/db.sqlite
|
|
state: touch
|
|
mode: u=rw,g=,o=
|
|
#####
|
|
# END: docker compose up!
|
|
#####
|
|
# We want this to be last so that all app-specific config has been done.
|
|
- name: Docker compose up! 🚀
|
|
community.docker.docker_compose:
|
|
project_src: /apps
|
|
state: present
|
|
restarted: true
|