jason_riddle.tailscale
Ansible-Rolle für Tailscale
Tailscale auf Linux.
Funktionen:
- Tailscale installieren.
- Knoten im Tailnet registrieren.
- HTTPS-Zertifikate ausstellen.
Anforderungen
Keine.
Rollen-Variablen
Verfügbare Variablen sind unten aufgeführt, zusammen mit Standardwerten (siehe defaults/main.yml
):
tailscale_apt_gpg_key: "https://pkgs.tailscale.com/stable/{{ ansible_distribution|lower }}/{{ ansible_distribution_release|lower }}.gpg"
tailscale_apt_repository: "deb https://pkgs.tailscale.com/stable/{{ ansible_distribution|lower }} {{ ansible_distribution_release|lower }} main"
Apt-Repository-Optionen für die Tailscale-Installation.
__ts_yum_centos_repo_url: "https://pkgs.tailscale.com/stable/centos/{{ ansible_distribution_major_version }}/tailscale.repo"
__ts_yum_fedora_repo_url: "https://pkgs.tailscale.com/stable/fedora/tailscale.repo"
tailscale_yum_repository_url: "{{ (ansible_distribution == 'Fedora') | ternary(__ts_yum_fedora_repo_url, __ts_yum_centos_repo_url) }}"
Yum-Repository-Optionen für die Tailscale-Installation.
tailscale_service_name: "tailscaled"
tailscale_service_state: gestartet
tailscale_service_enabled: true
Steuerung des Status des tailscaled-Dienstes.
tailscale_up_node: false
tailscale_up_authkey: ""
tailscale_up_timeout: "30s"
tailscale_up_extra_args: ""
tailscale_up_no_log: true
Führe tailscale up
mit Argumenten aus. tailscale_up_authkey
muss gesetzt sein.
Siehe https://tailscale.com/kb/1080/cli/#up.
tailscale_cert_enabled: false
tailscale_cert_domain: ""
tailscale_cert_dir: "/usr/local/etc/ssl/certs"
tailscale_cert_filename: "{{ tailscale_cert_domain }}.crt"
tailscale_cert_private_key_dir: "/usr/local/etc/ssl/private"
tailscale_cert_private_key_filename: "{{ tailscale_cert_domain }}.key"
Führe tailscale cert
mit Argumenten aus. tailscale_cert_domain
muss gesetzt sein.
Siehe https://tailscale.com/kb/1153/enabling-https/.
Abhängigkeiten
Keine.
Beispiel-Playbook
Tailscale installieren.
- hosts: alle
rollen:
- jason_riddle.tailscale
Knoten im Tailnet registrieren.
- hosts: alle
variablen:
tailscale_up_node: true
tailscale_up_authkey: "{{ lookup('env', 'TAILSCALE_AUTHKEY') }}"
# Optional: Argumente für den `tailscale up` Befehl angeben.
tailscale_up_extra_args: "--hostname={{ lookup('env', 'HOSTNAME') }}-{{ ansible_distribution|lower }}"
rollen:
- jason_riddle.tailscale
HTTPS-Zertifikate ausstellen.
Siehe https://tailscale.com/kb/1153/enabling-https/.
- hosts: alle
variablen:
tailscale_cert_enabled: true
tailscale_cert_domain: "maschinennamen.domain-alias.ts.net"
tailscale_cert_dir: "/usr/local/etc/ssl/certs"
tailscale_cert_filename: "{{ tailscale_cert_domain }}.crt"
tailscale_cert_private_key_dir: "/usr/local/etc/ssl/private"
tailscale_cert_private_key_filename: "{{ tailscale_cert_domain }}.key"
tailscale_default_options_enabled: true
tailscale_default_options_settings:
# Erlaube dem Benutzer caddy, das Zertifikat abzurufen.
# Siehe https://tailscale.com/kb/1190/caddy-certificates/#provide-non-root-users-with-access-to-fetch-certificate.
- regexp: "^#?TS_PERMIT_CERT_UID"
line: "TS_PERMIT_CERT_UID=\"caddy\""
rollen:
- jason_riddle.tailscale
Lizenz
MIT
Installieren
ansible-galaxy install jason_riddle.tailscale
Lizenz
mit
Downloads
2.8k
Besitzer