too much stuff

This commit is contained in:
counterweight 2025-12-01 11:16:47 +01:00
parent fbbeb59c0e
commit 6a43132bc8
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
25 changed files with 167 additions and 69 deletions

View file

@ -5,20 +5,18 @@
- ../infra_vars.yml
- ../services_config.yml
vars:
headscale_host_name: "spacey"
headscale_subdomain: "{{ subdomains.headscale }}"
headscale_domain: "https://{{ headscale_subdomain }}.{{ root_domain }}"
headscale_namespace: "{{ service_settings.headscale.namespace }}"
tasks:
- name: Set headscale host
set_fact:
headscale_host: "{{ groups['spacey'][0] }}"
- name: Set facts for headscale server connection
set_fact:
headscale_user: "{{ hostvars[headscale_host]['ansible_user'] }}"
headscale_key: "{{ hostvars[headscale_host]['ansible_ssh_private_key_file'] | default('') }}"
headscale_port: "{{ hostvars[headscale_host]['ansible_port'] | default(22) }}"
headscale_host: "{{ hostvars.get(headscale_host_name, {}).get('ansible_host', headscale_host_name) }}"
headscale_user: "{{ hostvars.get(headscale_host_name, {}).get('ansible_user', 'counterweight') }}"
headscale_key: "{{ hostvars.get(headscale_host_name, {}).get('ansible_ssh_private_key_file', '') }}"
headscale_port: "{{ hostvars.get(headscale_host_name, {}).get('ansible_port', 22) }}"
- name: Get user ID for namespace from headscale server via lapy
delegate_to: "{{ groups['lapy'][0] }}"