too much stuff
This commit is contained in:
parent
fbbeb59c0e
commit
6a43132bc8
25 changed files with 167 additions and 69 deletions
|
|
@ -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] }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue