diff --git a/Readme.md b/Readme.md index ace2105..f3d38e5 100644 --- a/Readme.md +++ b/Readme.md @@ -136,7 +136,6 @@ Alle Server- bzw. Gateway-spezifischen Parameter werden als Host-Variablen abgeb |ffrl_exit_server.ffrl-b-fra2-fra.public_ipv4_address|Key|185.66.194.1|IP-Adresse|IP-Adresse der Tunnel-Gegenstelle| |ffrl_exit_server.ffrl-b-fra2-fra.tunnel_ipv4_network|Key|100.64.0.188/31|Network/Prefix|Internes IPv4-Tunnel-Subnetz| |ffrl_exit_server.ffrl-b-fra2-fra.tunnel_ipv6_network|Key|2a03:2260:0:64::/64|Network/Prefix|Internes IPv6-Tunnel-Subnetz| -|tinc_private_key|Variable|"{{ lookup('passwordstore', 'tinc/icvpn/spinat_private returnall=true') }}"||Passwordstore lookup zum pass-Pfad| ## Sensible Informationen @@ -190,9 +189,6 @@ ffrl_exit_server: public_ipv4_address: 185.66.194.1 tunnel_ipv4_network: # Format: IP/Maske tunnel_ipv6_network: - -# Pfade zum tinc secret im passwordstore -tinc_private_key: "{{ lookup('passwordstore', 'tinc/icvpn/$hostname_private returnall=true') }}" ``` - Neues Gateway aufsetzen per `ansible-playbook playbooks/gateways.yml` - Hierbei werden die definierten Rollen auch auf schon aufgesetzte Gateways angewandt, was unkritisch ist, weil wir unsere Rollen idempotent schreiben. diff --git a/inventory/host_vars/uffschnitt.freifunk-mwu.de b/inventory/host_vars/uffschnitt.freifunk-mwu.de index 55d2495..51aaa82 100644 --- a/inventory/host_vars/uffschnitt.freifunk-mwu.de +++ b/inventory/host_vars/uffschnitt.freifunk-mwu.de @@ -29,5 +29,3 @@ ffrl_exit_server: public_ipv4_address: 185.66.194.1 tunnel_ipv4_network: 100.64.9.50/31 tunnel_ipv6_network: 2a03:2260:0:3c1::/64 - -tinc_private_key: "{{ lookup('passwordstore', 'tinc/icvpn/uffschnitt_private returnall=true') }}" diff --git a/roles/service-tinc/README.md b/roles/service-tinc/README.md index e4829e6..855df5c 100644 --- a/roles/service-tinc/README.md +++ b/roles/service-tinc/README.md @@ -28,18 +28,8 @@ routing_tables: ... ``` - Host Variable `magic` -- Host Variable `tinc_private_key` -``` -tinc_private_key: "{{ lookup('passwordstore', 'tinc/icvpn/$Hostname_private returnall=true') }}" -``` ## tinc private key Der private Schlüssel der icvpn tinc-Instanz liegt im passwordstore. Bevor man ein Gateway aufsetzt, muss der private Schlüssel generiert und im passwordstore hinterlegt werden. -Die Variable `tinc_private_key` folgt dem Aufbau: -``` -tinc_private_key: - $Instanz-Name: "{{ lookup('passwordstore', '$Pfad-im-passwordstore returnall=true') }}" -``` - diff --git a/roles/service-tinc/templates/rsa_key.priv.j2 b/roles/service-tinc/templates/rsa_key.priv.j2 index 7c952bc..1a7a690 100644 --- a/roles/service-tinc/templates/rsa_key.priv.j2 +++ b/roles/service-tinc/templates/rsa_key.priv.j2 @@ -1 +1 @@ -{{ tinc_private_key }} +{{ lookup('passwordstore', 'tinc/icvpn/' + inventory_hostname_short + '_private returnall=true') }}