From d4a4f576c9d6a7575d012f6da8bb625af58ee496 Mon Sep 17 00:00:00 2001 From: Tobias Hachmer Date: Wed, 25 Jul 2018 14:08:45 +0200 Subject: [PATCH] Rename fastd instance intragate to backbone --- Readme.md | 16 +++++------ inventory/group_vars/all | 4 +-- playbooks/gateways.yml | 2 +- roles/network-batman/README.md | 2 +- roles/network-batman/templates/batman.j2 | 2 +- roles/network-fastd/README.md | 6 ++-- roles/network-fastd/tasks/main.yml | 6 ++-- .../{fastd-intragate.j2 => fastd-backbone.j2} | 0 .../README.md | 4 +-- .../handlers/main.yml | 4 +-- .../meta/main.yml | 0 .../tasks/main.yml | 28 +++++++++---------- .../templates/fastd-backbone.conf.j2} | 0 .../templates/fastd-secret.conf.j2 | 0 roles/service-fastd-mesh/README.md | 2 +- 15 files changed, 38 insertions(+), 38 deletions(-) rename roles/network-fastd/templates/{fastd-intragate.j2 => fastd-backbone.j2} (100%) rename roles/{service-fastd-intragate => service-fastd-backbone}/README.md (95%) rename roles/{service-fastd-intragate => service-fastd-backbone}/handlers/main.yml (64%) rename roles/{service-fastd-intragate => service-fastd-backbone}/meta/main.yml (100%) rename roles/{service-fastd-intragate => service-fastd-backbone}/tasks/main.yml (66%) rename roles/{service-fastd-intragate/templates/fastd-intragate.conf.j2 => service-fastd-backbone/templates/fastd-backbone.conf.j2} (100%) rename roles/{service-fastd-intragate => service-fastd-backbone}/templates/fastd-secret.conf.j2 (100%) diff --git a/Readme.md b/Readme.md index f3d38e5..e6faf44 100644 --- a/Readme.md +++ b/Readme.md @@ -58,14 +58,14 @@ Diese Liste ist quasi das Herzstück zur Konfiguration der Mesh-spezifischen Par |fastd.nodes.instances[x].peers.repo|Key|https://github.com/freifunk-mwu/peers-ffmz.git|URL|| |fastd.nodes.instances[x].peers.version|Key|master|string|| |fastd.nodes.instances[x].pass|Key|fastd/mzvpn|string|| -|fastd.intragate|Dictionary|||| -|fastd.intragate.instances|List|||Jeder Listeneintrag ist ein Dictionary; Instanzen für Intragate-Kommunikation| -|fastd.intragate.instances[x].id|Key|0|integer|| -|fastd.intragate.instances[x].mtu|Key|1406|integer|| -|fastd.intragate.instances[x].peers|Dictionary|||| -|fastd.intragate.instances[x].peers.repo|Key|https://github.com/freifunk-mwu/peers-ffmz.git|URL|| -|fastd.intragate.instances[x].peers.version|Key|master|string|| -|fastd.intragate.instances[x].pass|Key|fastd/mzigvpn|string|| +|fastd.backbone|Dictionary|||| +|fastd.backbone.instances|List|||Jeder Listeneintrag ist ein Dictionary; Instanzen für Intra-Server-Kommunikation| +|fastd.backbone.instances[x].id|Key|0|integer|| +|fastd.backbone.instances[x].mtu|Key|1406|integer|| +|fastd.backbone.instances[x].peers|Dictionary|||| +|fastd.backbone.instances[x].peers.repo|Key|https://github.com/freifunk-mwu/ffmz-infrastructure-peers.git|URL|| +|fastd.backbone.instances[x].peers.version|Key|master|string|| +|fastd.backbone.instances[x].pass|Key|fastd/mzigvpn|string|| |dns|Dictionary|||| |dns.master|Key|fd37:b4dc:4b1e::a25:103|string; IP-Adresse|DNS-Master IP| |dns.forward_zones|List|||| diff --git a/inventory/group_vars/all b/inventory/group_vars/all index 7b23b12..d12fa21 100644 --- a/inventory/group_vars/all +++ b/inventory/group_vars/all @@ -63,7 +63,7 @@ meshes: repo: https://github.com/freifunk-mwu/peers-ffmz.git version: master pass: fastd/mzvpn - intragate: + backbone: instances: - id: 0 mtu: 1406 @@ -122,7 +122,7 @@ meshes: repo: https://github.com/freifunk-mwu/peers-ffwi.git version: master pass: fastd/wivpn - intragate: + backbone: instances: - id: 0 mtu: 1406 diff --git a/playbooks/gateways.yml b/playbooks/gateways.yml index 969bdc7..79dbfc0 100755 --- a/playbooks/gateways.yml +++ b/playbooks/gateways.yml @@ -25,7 +25,7 @@ - service-radvd - service-fastd - service-fastd-mesh - - service-fastd-intragate + - service-fastd-backbone - service-tinc - service-bird - service-bird-icvpn diff --git a/roles/network-batman/README.md b/roles/network-batman/README.md index 08eddd0..669922b 100644 --- a/roles/network-batman/README.md +++ b/roles/network-batman/README.md @@ -30,7 +30,7 @@ meshes: - id: 0 # integer mtu: # integer ... - intragate: + backbone: instances: - id: 0 # integer mtu: # integer diff --git a/roles/network-batman/templates/batman.j2 b/roles/network-batman/templates/batman.j2 index 557af93..2408aa1 100644 --- a/roles/network-batman/templates/batman.j2 +++ b/roles/network-batman/templates/batman.j2 @@ -7,7 +7,7 @@ auto {{ item.id }}bat iface {{ item.id }}bat hwaddress {{ mac | hwaddr('linux') }} - batman-ifaces {{ item.id }}0 {% for instance in item.fastd.nodes.instances %}{{ item.id }}vpn-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} {% for instance in item.fastd.intragate.instances %}{{ item.id }}igvpn-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} + batman-ifaces {{ item.id }}0 {% for instance in item.fastd.nodes.instances %}{{ item.id }}vpn-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} {% for instance in item.fastd.backbone.instances %}{{ item.id }}igvpn-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} batman-hop-penalty {{ item.batman.hop_penalty }} post-up /usr/sbin/batctl -m $IFACE it {{ item.batman.it }} post-up /usr/sbin/batctl -m $IFACE gw {{ item.batman.gw }} diff --git a/roles/network-fastd/README.md b/roles/network-fastd/README.md index a46ed83..73bce32 100644 --- a/roles/network-fastd/README.md +++ b/roles/network-fastd/README.md @@ -2,11 +2,11 @@ Diese Ansible role konfiguriert Netzwerk Interfaces für die definierten fastd Instanzen. -Es wird zwischen node- und intragate-Instanzen unterschieden. +Es wird zwischen node- und backbone-Instanzen unterschieden. ## Interface-Benamung - Node-Interfaces: _$mesh.id_ + vpn + '-' + _$mesh.fastd.nodes.instances.xx.mtu_, z.B. "mzvpn-1312" -- Intragate-Interfaces: _$mesh.id_ + 'ig' + vpn + '-' + _$mesh.fastd.intragate.instances.xx.mtu_, z.B. "mzigvpn-1312" +- Backbone-Interfaces: _$mesh.id_ + 'ig' + vpn + '-' + _$mesh.fastd.backbone.instances.xx.mtu_, z.B. "mzigvpn-1312" ## Benötigte Variablen @@ -24,7 +24,7 @@ meshes: - id: 0 # integer mtu: # integer ... - intragate: + backbone: instances: - id: 0 # integer mtu: # integer diff --git a/roles/network-fastd/tasks/main.yml b/roles/network-fastd/tasks/main.yml index d82aede..1069ebc 100644 --- a/roles/network-fastd/tasks/main.yml +++ b/roles/network-fastd/tasks/main.yml @@ -8,14 +8,14 @@ - "{{ meshes }}" - fastd.nodes.instances -- name: create fastd intragate interfaces +- name: create fastd backbone interfaces template: - src: fastd-intragate.j2 + src: fastd-backbone.j2 dest: "/etc/network/interfaces.d/{{ item.0.id }}igvpn-{{ item.1.mtu }}" notify: reload network interfaces with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances - name: flush handlers meta: flush_handlers diff --git a/roles/network-fastd/templates/fastd-intragate.j2 b/roles/network-fastd/templates/fastd-backbone.j2 similarity index 100% rename from roles/network-fastd/templates/fastd-intragate.j2 rename to roles/network-fastd/templates/fastd-backbone.j2 diff --git a/roles/service-fastd-intragate/README.md b/roles/service-fastd-backbone/README.md similarity index 95% rename from roles/service-fastd-intragate/README.md rename to roles/service-fastd-backbone/README.md index 5902db0..a5692a2 100644 --- a/roles/service-fastd-intragate/README.md +++ b/roles/service-fastd-backbone/README.md @@ -1,4 +1,4 @@ -# Ansible role service-fastd-intragate +# Ansible role service-fastd-backbone Diese Ansible role konfiguriert die fastd-Instanz für die Intra-Server Kommunikation. @@ -20,7 +20,7 @@ meshes: ... site_number: # integer fastd: - nodes: + backbone: instances: - id: 0 # integer mtu: # integer diff --git a/roles/service-fastd-intragate/handlers/main.yml b/roles/service-fastd-backbone/handlers/main.yml similarity index 64% rename from roles/service-fastd-intragate/handlers/main.yml rename to roles/service-fastd-backbone/handlers/main.yml index fcd9c22..626db9d 100644 --- a/roles/service-fastd-intragate/handlers/main.yml +++ b/roles/service-fastd-backbone/handlers/main.yml @@ -1,8 +1,8 @@ --- -- name: restart fastd intragate instances +- name: restart fastd backbone instances systemd: name: "fastd@{{ item.0.id }}igvpn-{{ item.1.mtu }}" state: restarted with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances diff --git a/roles/service-fastd-intragate/meta/main.yml b/roles/service-fastd-backbone/meta/main.yml similarity index 100% rename from roles/service-fastd-intragate/meta/main.yml rename to roles/service-fastd-backbone/meta/main.yml diff --git a/roles/service-fastd-intragate/tasks/main.yml b/roles/service-fastd-backbone/tasks/main.yml similarity index 66% rename from roles/service-fastd-intragate/tasks/main.yml rename to roles/service-fastd-backbone/tasks/main.yml index d7bb227..e930772 100644 --- a/roles/service-fastd-intragate/tasks/main.yml +++ b/roles/service-fastd-backbone/tasks/main.yml @@ -1,14 +1,14 @@ --- -- name: create fastd intragate directories +- name: create fastd backbone directories file: path: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}" state: directory mode: 0755 with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances -- name: create fastd peer intragate directories +- name: create fastd peer backbone directories file: path: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/peers" state: directory @@ -17,9 +17,9 @@ group: admin with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances -- name: clone fastd peer intragate repos +- name: clone fastd peer backbone repos git: repo: "{{ item.1.peers.repo }}" dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/peers" @@ -27,26 +27,26 @@ update: no with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances become: false -- name: template fastd mesh config +- name: template fastd backbone config template: - src: fastd-intragate.conf.j2 + src: fastd-backbone.conf.j2 dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/fastd.conf" - notify: restart fastd intragate instances + notify: restart fastd backbone instances with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances -- name: write fastd intragate secret +- name: write fastd backbone secret template: src: fastd-secret.conf.j2 dest: "/etc/fastd/{{ item.0.id }}igvpn-{{ item.1.mtu }}/secret.conf" - notify: restart fastd intragate instances + notify: restart fastd backbone instances with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances - name: configure systemd unit fastd@ systemd: @@ -55,4 +55,4 @@ state: started with_subelements: - "{{ meshes }}" - - fastd.intragate.instances + - fastd.backbone.instances diff --git a/roles/service-fastd-intragate/templates/fastd-intragate.conf.j2 b/roles/service-fastd-backbone/templates/fastd-backbone.conf.j2 similarity index 100% rename from roles/service-fastd-intragate/templates/fastd-intragate.conf.j2 rename to roles/service-fastd-backbone/templates/fastd-backbone.conf.j2 diff --git a/roles/service-fastd-intragate/templates/fastd-secret.conf.j2 b/roles/service-fastd-backbone/templates/fastd-secret.conf.j2 similarity index 100% rename from roles/service-fastd-intragate/templates/fastd-secret.conf.j2 rename to roles/service-fastd-backbone/templates/fastd-secret.conf.j2 diff --git a/roles/service-fastd-mesh/README.md b/roles/service-fastd-mesh/README.md index 42d764c..f46e41b 100644 --- a/roles/service-fastd-mesh/README.md +++ b/roles/service-fastd-mesh/README.md @@ -12,7 +12,7 @@ Diese Ansible role konfiguriert die fastd-Instanz für die Knoten Kommunikation. ## Instanz-Benamung - Node-Instanzen: _$mesh.id_ + vpn + '-' + _$mesh.fastd.nodes.instances.xx.mtu_, z.B. "mzvpn-1312" -- Intragate-Instanzen: _$mesh.id_ + 'ig' + vpn + '-' + _$mesh.fastd.intragate.instances.xx.mtu_, z.B. "mzigvpn-1312" +- Backbone-Instanzen: _$mesh.id_ + 'ig' + vpn + '-' + _$mesh.fastd.backbone.instances.xx.mtu_, z.B. "mzigvpn-1312" ## Benötigte Variablen