Separate watchtower from vipy

This commit is contained in:
counterweight 2025-07-21 09:39:36 +02:00
parent 2c9a70f0fd
commit 13537aa984
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
7 changed files with 15 additions and 11 deletions

View file

@ -1,6 +1,9 @@
[vipy]
your.vps.ip.here ansible_user=counterweight ansible_port=22 ansible_ssh_private_key_file=~/.ssh/your-key
[watchtower]
your.vps.ip.here ansible_user=counterweight ansible_port=22 ansible_ssh_private_key_file=~/.ssh/your-key
# Local connection to laptop: this assumes you're running ansible commands from your personal laptop
# Make sure to adjust the username
[lapy]

View file

@ -1,5 +1,5 @@
- name: Secure Debian VPS
hosts: vipy
hosts: vipy,watchtower
vars_files:
- ../infra_vars.yml
become: true

View file

@ -1,5 +1,5 @@
- name: Secure Debian VPS
hosts: vipy
hosts: vipy,watchtower
vars_files:
- ../infra_vars.yml
become: true

View file

@ -1,5 +1,5 @@
- name: Install and configure Caddy on Debian 12
hosts: vipy
hosts: vipy,watchtower
become: yes
tasks:

View file

@ -1,5 +1,5 @@
- name: Deploy Uptime Kuma with Docker Compose and configure Caddy reverse proxy
hosts: vipy
hosts: watchtower
become: yes
vars_files:
- ../../infra_vars.yml

View file

@ -8,7 +8,7 @@ caddy_sites_dir: /etc/caddy/sites-enabled
uptime_kuma_subdomain: uptime
# Remote access
remote_host: "{{ groups['vipy'][0] }}"
remote_host: "{{ groups['watchtower'][0] }}"
remote_user: "{{ hostvars[remote_host]['ansible_user'] }}"
remote_key_file: "{{ hostvars[remote_host]['ansible_ssh_private_key_file'] | default('') }}"