This commit is contained in:
nora 2024-07-27 10:22:53 +02:00
parent 6d47ea67f0
commit e6e0400c54
11 changed files with 29 additions and 71 deletions

View file

@ -1,7 +1,5 @@
---
- name: Generic setup
ansible.builtin.import_playbook: ./basic-setup.yml
- name: VPS 1
ansible.builtin.import_playbook: ./vps1.yml
- name: VPS 2
ansible.builtin.import_playbook: ./vps2.yml

View file

@ -36,8 +36,8 @@
ansible.builtin.shell: |
set -euo pipefail
sudo rm -f /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
rm -f /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
# todo: show ok/changed
args:

View file

@ -1,6 +1,4 @@
vps:
hosts:
vps1:
ansible_host: vps1.nilstrieb.dev
vps2:
ansible_host: vps2.nilstrieb.dev

View file

@ -1,18 +0,0 @@
---
- name: VPS 1 setup
hosts: vps1
gather_facts: false
tasks:
#####
# 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_v2:
project_src: /apps
state: "present"