Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| linux:ansible:ffmuc-rpb4-ol [14.09.2022 14:48. ] – angelegt django | linux:ansible:ffmuc-rpb4-ol [18.11.2024 18:58. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 11: | Zeile 11: | ||
| ====== Inhalt ====== | ====== Inhalt ====== | ||
| - | |||
| - | <WRAP center round alert 30%> | ||
| - | **ACHTUNG: | ||
| - | </ | ||
| - | |||
| <WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
| Zeile 146: | Zeile 141: | ||
| */ | */ | ||
| === Ansible-Konfigurationsdatei === | === Ansible-Konfigurationsdatei === | ||
| + | <WRAP center round tip 80%> | ||
| + | Der ungeduldigen Leser kann auch direkt zur Tat schreiten und das manuelle Anlegen des Verzeichnisses und des Ansible-Scripts überspringen. Mit Folgendem Befehl erledigt man dies sozusagen auf einem Rutsch: | ||
| + | $ mkdir ~/ansible ; wget https:// | ||
| + | |||
| + | Anschliessend kann man direkt zur Ausführung des Playbooks schreiten: | ||
| + | | ||
| + | </ | ||
| + | |||
| + | |||
| /* | /* | ||
| Als nächstes kopieren wir uns die Vorlage-Konfiguratinsdatei aus dem Verzeichnis **''/ | Als nächstes kopieren wir uns die Vorlage-Konfiguratinsdatei aus dem Verzeichnis **''/ | ||
| Zeile 238: | Zeile 242: | ||
| $ cd ~/ansible | $ cd ~/ansible | ||
| - | $ git clone https://github.com/Django-BOfH/ffmuc-rpb4-ol.git . | + | $ git clone http://gitlab.nausch.org/django/ffmuc-offloader_rpb4.git . |
| Somit ergibt sich folgende Verzeichnis- und Dateistruktur: | Somit ergibt sich folgende Verzeichnis- und Dateistruktur: | ||
| < | < | ||
| - | ├── filter_plugins | ||
| - | │ └── main.yml | ||
| - | ├── inventories | ||
| - | │ ├── production | ||
| - | │ │ └── hosts.yml | ||
| - | │ └── staging | ||
| - | │ | ||
| - | ├── library | ||
| - | │ └── main.yml | ||
| - | ├── LICENSE | ||
| - | ├── module_utils | ||
| - | │ └── main.yml | ||
| - | ├── README.md | ||
| - | ├── roles | ||
| - | │ ├── basic | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── hostname.yml | ||
| - | │ │ │ ├── hosts.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── reboot.yml | ||
| - | │ │ │ ├── rfkill.yml | ||
| - | │ │ │ ├── update.yml | ||
| - | │ │ │ └── usercomment.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── hosts.j2 | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── batman | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── backport.yml | ||
| - | │ │ │ ├── batmanstart.yml | ||
| - | │ │ │ ├── compile.yml | ||
| - | │ │ │ ├── install.yml | ||
| - | │ │ │ ├── interfaceconfigure.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── modulloads.yml | ||
| - | │ │ │ ├── reboot.yml | ||
| - | │ │ │ └── utilsinstall.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── batman-adv.module.j2 | ||
| - | │ │ │ ├── dkms.j2 | ||
| - | │ │ │ ├── interfaces.j2 | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── client-mesh | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── batmanmitwifi.yml | ||
| - | │ │ │ ├── batmanohnewifi.yml | ||
| - | │ │ │ ├── clientohnemesh.yml | ||
| - | │ │ │ ├── getvxlanid.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── meshohneclient.yml | ||
| - | │ │ │ └── meshundclient.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── interfaces_client_ohne_mesh.j2 | ||
| - | │ │ │ ├── interfaces_mesh_mit_client.j2 | ||
| - | │ │ │ ├── interfaces_mesh_ohne_client.j2 | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── rclocal_both.j2 | ||
| - | │ │ │ └── rclocal_vxlan.j2 | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── common | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── ext-respondd | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── aliasgenerate.yml | ||
| - | │ │ │ ├── configgenerate.yml | ||
| - | │ │ │ ├── copyconfig.yml | ||
| - | │ │ │ ├── gitclone.yml | ||
| - | │ │ │ ├── gitinstall.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── servicestartup.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── ext-respondd_alias.json.j2 | ||
| - | │ │ │ ├── ext-respondd_config.json.j2 | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── fastd | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── directorygenerate.yml | ||
| - | │ │ │ ├── fastdconfigure.yml | ||
| - | │ │ │ ├── fastdgetsocket.yml | ||
| - | │ │ │ ├── fastdinstall.yml | ||
| - | │ │ │ ├── fastdkeygen.yml | ||
| - | │ │ │ ├── fastdsecretkeyget.yml | ||
| - | │ │ │ ├── fastdstartup.yml | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── fastd.j2 | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── final | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── reboot.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── hostapd | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── configure.yml | ||
| - | │ │ │ ├── genconfig.yml | ||
| - | │ │ │ ├── install.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── servicestartup.yml | ||
| - | │ │ │ └── wlanbridging.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── hostapd.j2 | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── rclocal_wifi.j2 | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── kvm_hostgen | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── generate.yml | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── kvm-new | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── oled | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── adafruitclone.yml | ||
| - | │ │ │ ├── adafruitconfig.yml | ||
| - | │ │ │ ├── i2c_arm.yml | ||
| - | │ │ │ ├── i2c-bcm2708.yml | ||
| - | │ │ │ ├── i2c-dev.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── packages.yml | ||
| - | │ │ │ ├── reboot.yml | ||
| - | │ │ │ ├── scriptclone.yml | ||
| - | │ │ │ ├── scriptconfig.yml | ||
| - | │ │ │ ├── scriptstartup.yml | ||
| - | │ │ │ └── scriptstart.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── bandwidth.j2 | ||
| - | │ │ │ ├── config.j2 | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── oled-bandwidth.j2 | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── vxlan | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── configure.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── vxlanstart.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── systemd-service-file.j2 | ||
| - | │ │ │ └── vxlan-init.j2 | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| - | │ └── wireguard | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | │ | ||
| - | └── wireguard-offloader.yml | ||
| - | </ | ||
| - | ==== Kopieren des Ansible-Playbooks ==== | ||
| - | Nun können wir uns " | ||
| - | * **{{: | ||
| - | * // | ||
| - | * // | ||
| - | * // | ||
| - | * // | ||
| - | * // | ||
| - | |||
| - | $ wget \ | ||
| - | | ||
| - | -O ansible-playbook-ffmuc-offloader-auf_basis_raspberry-4b.tar.gz | ||
| - | |||
| - | Anschließend entpacken wir es an Ort und Stelle. | ||
| - | $ tar -xvf ansible-playbook-ffmuc-offloader-auf_basis_raspberry-4b.tar.gz | ||
| - | |||
| - | Somit ergibt sich folgende Verzeichnis- und Dateistruktur: | ||
| - | < | ||
| ├── filter_plugins | ├── filter_plugins | ||
| ├── inventories | ├── inventories | ||
| │ ├── production | │ ├── production | ||
| │ │ ├── group_vars | │ │ ├── group_vars | ||
| - | │ │ ├── hosts.yml | + | │ │ │ └── ffmuc |
| + | │ │ │ | ||
| + | │ │ │ | ||
| + | │ │ │ | ||
| + | │ │ │ | ||
| + | │ │ │ | ||
| + | │ │ │ | ||
| + | │ │ ├── hosts | ||
| │ │ └── host_vars | │ │ └── host_vars | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| + | │ │ | ||
| │ └── staging | │ └── staging | ||
| │ | │ | ||
| Zeile 566: | Zeile 269: | ||
| │ | │ | ||
| ├── library | ├── library | ||
| + | ├── LICENSE | ||
| ├── module_utils | ├── module_utils | ||
| + | ├── playbooks | ||
| + | │ └── wireguard-offloader.yml | ||
| + | ├── README.md | ||
| ├── roles | ├── roles | ||
| │ ├── basic | │ ├── basic | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| Zeile 589: | Zeile 292: | ||
| │ │ │ └── usercomment.yml | │ │ │ └── usercomment.yml | ||
| │ │ ├── templates | │ │ ├── templates | ||
| - | │ │ │ | + | │ │ │ |
| - | │ │ │ └── main.yml | + | |
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── batman | │ ├── batman | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| - | │ │ │ ├── backport.yml | ||
| │ │ │ ├── batmanstart.yml | │ │ │ ├── batmanstart.yml | ||
| │ │ │ ├── compile.yml | │ │ │ ├── compile.yml | ||
| Zeile 614: | Zeile 310: | ||
| │ │ │ ├── modulloads.yml | │ │ │ ├── modulloads.yml | ||
| │ │ │ ├── reboot.yml | │ │ │ ├── reboot.yml | ||
| + | │ │ │ ├── rsyslog.yml | ||
| │ │ │ └── utilsinstall.yml | │ │ │ └── utilsinstall.yml | ||
| │ │ ├── templates | │ │ ├── templates | ||
| + | │ │ │ ├── 01-blocklist.j2 | ||
| │ │ │ ├── batman-adv.module.j2 | │ │ │ ├── batman-adv.module.j2 | ||
| │ │ │ ├── dkms.j2 | │ │ │ ├── dkms.j2 | ||
| - | │ │ │ | + | │ │ │ |
| - | │ │ │ └── main.yml | + | |
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── client-mesh | │ ├── client-mesh | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| Zeile 646: | Zeile 338: | ||
| │ │ │ ├── interfaces_mesh_mit_client.j2 | │ │ │ ├── interfaces_mesh_mit_client.j2 | ||
| │ │ │ ├── interfaces_mesh_ohne_client.j2 | │ │ │ ├── interfaces_mesh_ohne_client.j2 | ||
| - | │ │ │ ├── main.yml | ||
| │ │ │ ├── rclocal_both.j2 | │ │ │ ├── rclocal_both.j2 | ||
| │ │ │ └── rclocal_vxlan.j2 | │ │ │ └── rclocal_vxlan.j2 | ||
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── common | │ ├── common | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| │ │ │ └── main.yml | │ │ │ └── main.yml | ||
| │ │ ├── templates | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── ext-respondd | │ ├── ext-respondd | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| │ │ │ ├── aliasgenerate.yml | │ │ │ ├── aliasgenerate.yml | ||
| + | │ │ │ ├── bugfixing.yml | ||
| │ │ │ ├── configgenerate.yml | │ │ │ ├── configgenerate.yml | ||
| │ │ │ ├── copyconfig.yml | │ │ │ ├── copyconfig.yml | ||
| Zeile 691: | Zeile 372: | ||
| │ │ ├── templates | │ │ ├── templates | ||
| │ │ │ ├── ext-respondd_alias.json.j2 | │ │ │ ├── ext-respondd_alias.json.j2 | ||
| - | │ │ │ | + | │ │ │ |
| - | │ │ │ └── main.yml | + | |
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── fastd | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── library | ||
| - | │ │ ├── lookup_plugin | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── module_utils | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── directorygenerate.yml | ||
| - | │ │ │ ├── fastdconfigure.yml | ||
| - | │ │ │ ├── fastdgetsocket.yml | ||
| - | │ │ │ ├── fastdinstall.yml | ||
| - | │ │ │ ├── fastdkeygen.yml | ||
| - | │ │ │ ├── fastdsecretkeyget.yml | ||
| - | │ │ │ ├── fastdstartup.yml | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── fastd.j2 | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── final | │ ├── final | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| Zeile 737: | Zeile 386: | ||
| │ │ │ └── reboot.yml | │ │ │ └── reboot.yml | ||
| │ │ ├── templates | │ │ ├── templates | ||
| - | │ │ │ └── main.yml | ||
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── hostapd | │ ├── hostapd | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| Zeile 761: | Zeile 404: | ||
| │ │ ├── templates | │ │ ├── templates | ||
| │ │ │ ├── hostapd.j2 | │ │ │ ├── hostapd.j2 | ||
| - | │ │ │ ├── main.yml | ||
| │ │ │ └── rclocal_wifi.j2 | │ │ │ └── rclocal_wifi.j2 | ||
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| - | │ ├── oled | ||
| - | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── library | ||
| - | │ │ ├── lookup_plugin | ||
| - | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| - | │ │ ├── module_utils | ||
| - | │ │ ├── tasks | ||
| - | │ │ │ ├── adafruitclone.yml | ||
| - | │ │ │ ├── adafruitconfig.yml | ||
| - | │ │ │ ├── i2c_arm.yml | ||
| - | │ │ │ ├── i2c-bcm2708.yml | ||
| - | │ │ │ ├── i2c-dev.yml | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ ├── packages.yml | ||
| - | │ │ │ ├── reboot.yml | ||
| - | │ │ │ ├── scriptclone.yml | ||
| - | │ │ │ ├── scriptconfig.yml | ||
| - | │ │ │ ├── scriptstartup.yml | ||
| - | │ │ │ └── scriptstart.yml | ||
| - | │ │ ├── templates | ||
| - | │ │ │ ├── bandwidth.j2 | ||
| - | │ │ │ ├── config.j2 | ||
| - | │ │ │ ├── main.yml | ||
| - | │ │ │ └── oled-bandwidth.j2 | ||
| - | │ │ └── vars | ||
| - | │ │ | ||
| │ ├── vxlan | │ ├── vxlan | ||
| │ │ ├── defaults | │ │ ├── defaults | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── files | │ │ ├── files | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── handlers | │ │ ├── handlers | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── library | │ │ ├── library | ||
| │ │ ├── lookup_plugin | │ │ ├── lookup_plugin | ||
| │ │ ├── meta | │ │ ├── meta | ||
| - | │ │ │ └── main.yml | ||
| │ │ ├── module_utils | │ │ ├── module_utils | ||
| │ │ ├── tasks | │ │ ├── tasks | ||
| Zeile 814: | Zeile 419: | ||
| │ │ │ └── vxlanstart.yml | │ │ │ └── vxlanstart.yml | ||
| │ │ ├── templates | │ │ ├── templates | ||
| - | │ │ │ ├── main.yml | ||
| │ │ │ ├── systemd-service-file.j2 | │ │ │ ├── systemd-service-file.j2 | ||
| │ │ │ └── vxlan-init.j2 | │ │ │ └── vxlan-init.j2 | ||
| │ │ └── vars | │ │ └── vars | ||
| - | │ │ | ||
| │ └── wireguard | │ └── wireguard | ||
| │ | │ | ||
| - | │ | ||
| │ | │ | ||
| - | │ | ||
| │ | │ | ||
| - | │ | ||
| │ | │ | ||
| │ | │ | ||
| │ | │ | ||
| - | │ | ||
| │ | │ | ||
| │ | │ | ||
| Zeile 839: | Zeile 438: | ||
| │ | │ | ||
| │ | │ | ||
| + | │ | ||
| │ | │ | ||
| │ | │ | ||
| Zeile 844: | Zeile 444: | ||
| │ | │ | ||
| │ | │ | ||
| - | │ | + | │ |
| │ | │ | ||
| │ | │ | ||
| - | │ | ||
| └── wireguard-offloader.yml | └── wireguard-offloader.yml | ||
| </ | </ | ||
| + | ==== Kopieren des Ansible-Playbooks ==== | ||
| + | Alternativ zu einem **'' | ||
| + | * **[[https:// | ||
| + | * // | ||
| + | * // | ||
| + | * // | ||
| + | * // | ||
| + | * // | ||
| + | * // | ||
| + | |||
| + | $ wget https:// | ||
| + | |||
| + | Anschliessend entpacken wir es an Ort und Stelle. | ||
| + | $ tar -xvf ffmuc-offloader_rpb4-main.tar.gz | ||
| + | |||
| ==== Aufbau des Ansible-Playbooks - Inhalte ==== | ==== Aufbau des Ansible-Playbooks - Inhalte ==== | ||
| Nachfolgend finden wir die Inhalte der einzelnen Dateien die im ansible-playbook enthalten sind: | Nachfolgend finden wir die Inhalte der einzelnen Dateien die im ansible-playbook enthalten sind: | ||
| === Inventory-Definition === | === Inventory-Definition === | ||
| - | < | + | Das Inventory ist aufgeteilt in einzelne Dateien. Die Definition der Hosts erfolgt via **'' |
| - | ffmuc: | + | < |
| - | children: | + | |
| - | ffmuc_deb: | + | |
| - | vars: | + | |
| - | ansible_ssh_user: | + | |
| - | hosts: | + | |
| - | raspberry-wireguard: | + | |
| - | wireguard_ports: | + | |
| - | muc_cty: | + | |
| - | muc_nord: | + | |
| - | muc_ost: | + | |
| - | muc_sued: | + | |
| - | muc_west: | + | |
| - | uml_nord: | + | |
| - | uml_ost: | + | |
| - | uml_sued: | + | |
| - | uml_west: | + | |
| - | gauting: | + | |
| - | freising: | + | |
| - | welt: | + | |
| - | vxlan_ids: | + | |
| - | muc_cty: | + | |
| - | muc_nord: | + | |
| - | muc_ost: | + | |
| - | muc_sued: | + | |
| - | muc_west: | + | |
| - | uml_nord: | + | |
| - | uml_ost: | + | |
| - | uml_sued: | + | |
| - | uml_west: | + | |
| - | gauting: | + | |
| - | freising: | + | |
| - | welt: | + | |
| - | gw_linklocal: | + | |
| - | gw04: " | + | |
| - | gw05: " | + | |
| - | gw06: " | + | |
| - | gw07: " | + | |
| - | gw_publickey: | + | |
| - | gw04: " | + | |
| - | gw05: " | + | |
| - | gw06: " | + | |
| - | gw07: " | + | |
| - | gw_vxlan_ids: | + | |
| - | muc_cty: | + | |
| - | muc_nord: | + | |
| - | muc_ost: | + | |
| - | muc_sued: | + | |
| - | muc_west: | + | |
| - | uml_nord: | + | |
| - | uml_ost: | + | |
| - | uml_sued: | + | |
| - | uml_west: | + | |
| - | gauting: | + | |
| - | freising: | + | |
| - | welt: | + | |
| - | batman_adv_version: | + | |
| - | ffmuc_segment: | + | |
| - | ffmuc_gateway: | + | |
| - | raspberry_hostname: | + | |
| - | node_contact_address: | + | |
| - | raspberry_latitude: | + | |
| - | raspberry_longitude: | + | |
| - | raspberry_wifi: | + | |
| - | raspberry_clientvlan: | + | |
| - | raspberry_meshvlan: | + | |
| - | raspberry_oled: | + | |
| - | dtparam: | + | |
| - | ... #YAML ende syntax (optional) | + | |
| - | </ | + | |
| + | # Definition einer Hostgruppe " | ||
| + | [ffmuc] | ||
| + | |||
| + | # Auflistung aller Hosts, die der vorgenannten Hostgruppe angehören. | ||
| + | rpb4-ol-a | ||
| + | rpb4-ol-b | ||
| + | rpb4-ol-p</ | ||
| + | |||
| + | Je Host den wir bearbeiten wollen definieren wir dann dessen Eigenschaften in der Datei **'' | ||
| + | $ less ~/ | ||
| + | <file bash ..inventories/ | ||
| + | # stationäre schwarzes Plastikgehäuse Raspberry 4B mit PoE-HAT und Display | ||
| + | # MAC: dc: | ||
| + | ansible_ssh_host: | ||
| + | ansible_port: | ||
| + | ansible_user: | ||
| + | ansible_ssh_private_key_file: | ||
| + | # | ||
| + | batman_adv_version: | ||
| + | ffmuc_segment: | ||
| + | ffmuc_gateway: | ||
| + | raspberry_hostname: | ||
| + | node_contact_address: | ||
| + | raspberry_latitude: | ||
| + | raspberry_longitude: | ||
| + | raspberry_wifi: | ||
| + | raspberry_clientvlan: | ||
| + | raspberry_meshvlan: | ||
| + | raspberry_oled: | ||
| + | |||
| + | <WRAP center round important 60%> | ||
| + | Hier passen wir natürlich die Parameter unserer eigenen Umgebung an, damit diese richtig später vom ansible-script auch gesetzt werden! | ||
| + | </ | ||
| + | |||
| + | Im Verzeichnis **'' | ||
| + | < | ||
| + | ├── gateway_keys | ||
| + | ├── gateway_link_adresses | ||
| + | ├── gateway_mesh_vpn_vxlan_ids | ||
| + | ├── global_vars | ||
| + | ├── vxlan_ids | ||
| + | └── wireguard_ports</ | ||
| + | |||
| + | Der interessierte Leser kann hier natürlich bei Interesse jeweils einen Blick hinein werfen. | ||
| + | $ less ~/ | ||
| + | |||
| + | <file bash gateway_keys># | ||
| + | gw_publickey: | ||
| + | gw04: " | ||
| + | gw05: " | ||
| + | gw06: " | ||
| + | gw07: " | ||
| + | <file bash gateway_link_adresses># | ||
| + | gw_linklocal: | ||
| + | gw04: " | ||
| + | gw05: " | ||
| + | gw06: " | ||
| + | gw07: " | ||
| + | <file bash gateway_mesh_vpn_vxlan_ids># | ||
| + | gw_vxlan_ids: | ||
| + | muc_cty: | ||
| + | muc_nord: 1920014 | ||
| + | muc_ost: | ||
| + | muc_sued: 12815947 | ||
| + | muc_west: 29149 | ||
| + | uml_nord: 403289 | ||
| + | uml_ost: | ||
| + | uml_sued: 12090508 | ||
| + | uml_west: 935867 | ||
| + | gauting: | ||
| + | freising: 4669918 | ||
| + | welt: | ||
| + | augsburg: 2962115</ | ||
| + | <file bash global_vars> | ||
| + | dtparam: " | ||
| + | <file bash vxlan_ids># | ||
| + | vxlan_ids: | ||
| + | muc_cty: | ||
| + | muc_nord: 15521492 | ||
| + | muc_ost: | ||
| + | muc_sued: 8599288 | ||
| + | muc_west: 7318933 | ||
| + | uml_nord: 5705961 | ||
| + | uml_ost: | ||
| + | uml_sued: 16544703 | ||
| + | uml_west: 16677749 | ||
| + | gauting: | ||
| + | freising: 12937858 | ||
| + | welt: | ||
| + | augsburg: 10700201q</ | ||
| + | <file bash wireguard_ports> | ||
| + | muc_cty: | ||
| + | muc_nord: 40003 | ||
| + | muc_ost: | ||
| + | muc_sued: 40005 | ||
| + | muc_west: 40006 | ||
| + | uml_nord: 40007 | ||
| + | uml_ost: | ||
| + | uml_sued: 40009 | ||
| + | uml_west: 40010 | ||
| + | gauting: | ||
| + | freising: 40013 | ||
| + | welt: 40011 | ||
| + | augsburg: 40014</ | ||
| + | |||
| === Playbook " | === Playbook " | ||
| - | < | + | < |
| - | - name: raspi_offloader_file.yml | + | # Ansible Playbook für (statische) Konfiguration eines Offloader auf Basis eines Raspberry PI 4B |
| - | hosts: | + | # Aufruf via $ ansible-playbook playbooks/ |
| - | become: | + | # bzw. $ ansible-playbook playbooks/ |
| - | become_user: | + | # Host mit dem Namen rpb4 aus derm inventory |
| + | |||
| + | - name: wireguard-offloader.yml # Name des Playbooks | ||
| + | hosts: | ||
| + | become: | ||
| + | become_user: | ||
| roles: | roles: | ||
| - | - basic | + | - role: basic |
| - | - batman | + | tags: basic |
| - | - wireguard | + | - role: batman |
| - | - vxlan | + | tags: batmam |
| - | - ext-respondd | + | - role: wireguard |
| - | - hostapd | + | tags: wireguard |
| - | - client-mesh | + | - role: vxlan |
| - | - oled | + | tags: vxlan # |
| - | - final | + | - role: ext-respondd |
| + | tags: ext-respondd | ||
| + | - role: hostapd | ||
| + | when: ( raspberry_wifi == true ) # | ||
| + | tags: hostapd | ||
| + | - role: client-mesh | ||
| + | tags: client-mesh # | ||
| + | - role: final | ||
| + | tags: final # | ||
| ... # YML Ende | ... # YML Ende | ||
| </ | </ | ||
| Zeile 949: | Zeile 611: | ||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: hostname.yml | - include: hostname.yml | ||
| - include: hosts.yml | - include: hosts.yml | ||
| Zeile 955: | Zeile 617: | ||
| - include: rfkill.yml | - include: rfkill.yml | ||
| - include: update.yml | - include: update.yml | ||
| - | - include: reboot.yml | + | - include: reboot.yml |
| - | </ | + | ...</ |
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: | + | |
| - | cmd: hostnamectl set-hostname {{ raspberry_hostname }} | + | |
| - | </ | + | |
| - | <file java ~/ | + | - name: "Hostname ändern" |
| - | | + | ansible.builtin.command: |
| - | # https:// | + | |
| - | | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | </ | + | |
| - | <file java ~/ | + | ... |
| - | - name: " | + | |
| - | # https:// | + | |
| - | user: | + | |
| - | name: pi | + | |
| - | comment: " | + | |
| - | state: present | + | |
| </ | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: | + | |
| - | cmd: rfkill unblock wifi | + | |
| - | </ | + | |
| - | <file java ~/ | + | - name: "Template Konfigurationsdatei für /etc/hosts an Ort und Stelle kopieren und Variablen anpassen" |
| - | | + | ansible.builtin.template: |
| - | | + | |
| - | | + | dest: /etc/hosts |
| - | | + | |
| - | | + | group: root |
| + | mode: ' | ||
| + | |||
| + | ... | ||
| </ | </ | ||
| - | < | + | < |
| - | - name: "Reboot nach update" | + | |
| - | | + | - name: "Beschreibung des User ' |
| - | reboot: | + | ansible.builtin.user: |
| - | </ | + | |
| + | comment: " | ||
| + | state: present | ||
| + | |||
| + | ...</file> | ||
| + | |||
| + | <file c++ ~/ansible/ | ||
| + | |||
| + | - name: " | ||
| + | | ||
| + | cmd: rfkill unblock wifi | ||
| + | changed_when: | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ansible/roles/basic/tasks/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.apt: | ||
| + | | ||
| + | |||
| + | - name: "Alle installierten Pakete Updaten" | ||
| + | ansible.builtin.apt: | ||
| + | name: " | ||
| + | state: latest | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | | ||
| + | |||
| + | ...</ | ||
| == Templates == | == Templates == | ||
| <file java ~/ | <file java ~/ | ||
| Zeile 1010: | Zeile 689: | ||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: install.yml | - include: install.yml | ||
| - include: compile.yml | - include: compile.yml | ||
| - include: modulloads.yml | - include: modulloads.yml | ||
| - | - include: backport.yml | + | - include: utilsinstall.yml |
| - | - include: utilsinstall.yml | + | |
| - include: batmanstart.yml | - include: batmanstart.yml | ||
| - include: interfaceconfigure.yml | - include: interfaceconfigure.yml | ||
| - | - include: reboot.yml | + | - include: rsyslog.yml |
| - | </ | + | - include: reboot.yml |
| + | ... # YML Ende</ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | get_url: | + | |
| - | url: https:// | + | |
| - | dest: / | + | |
| - | mode: ' | + | |
| - | | + | - name: "Download |
| - | | + | ansible.builtin.get_url: |
| - | | + | |
| - | src: / | + | |
| - | dest: /usr/src | + | mode: ' |
| - | remote_src: yes | + | |
| - | </ | + | |
| - | <file java ~/ | + | - name: "Entpacken |
| - | | + | ansible.builtin.unarchive: |
| - | | + | |
| - | | + | dest: /usr/src |
| - | update_cache: | + | |
| - | pkg: | + | |
| - | - dkms | + | |
| - | - raspberrypi-kernel-headers | + | |
| - | state: present | + | |
| - | - name: " | + | ...</file> |
| - | # https:// | + | |
| - | make: | + | |
| - | chdir: /usr/src/linux-headers-{{ ansible_kernel }} | + | |
| - | target: scripts | + | |
| - | ignore_errors: | + | |
| - | - name: " | + | <file c++ ~/ansible/roles/batman/tasks/compile.yml>--- |
| - | # https://docs.ansible.com/ansible/latest/modules/template_module.html | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | | + | - name: "Installation des Dynamic Kernel Module Support |
| - | # https:// | + | ansible.builtin.apt: |
| - | | + | |
| - | | + | pkg: |
| - | failed_when: | + | - dkms |
| - | changed_when: | + | |
| + | | ||
| - | | + | - name: "Rebuild |
| - | | + | community.general.make: |
| - | command: dkms build -m batman-adv -v {{ batman_adv_version | + | |
| + | target: scripts | ||
| + | ignore_errors: | ||
| - | | + | - name: "Anlegen der dkms.conf für Dynamic Kernel Module |
| - | # https:// | + | ansible.builtin.template: |
| - | | + | |
| - | </file> | + | dest: /usr/src/batman-adv-{{ batman_adv_version }}/dkms.conf |
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| - | <file java ~/ | + | - name: " |
| - | | + | ansible.builtin.command: |
| - | # https:// | + | |
| - | | + | register: ret |
| - | src: templates/batman-adv.module.j2 | + | failed_when: |
| - | dest: / | + | |
| - | | + | - name: "Dynamic Kernel Module bauen" |
| - | # https:// | + | ansible.builtin.command: |
| - | | + | |
| - | name: dummy | + | |
| - | state: present | + | |
| - | | + | - name: " |
| - | # https:// | + | ansible.builtin.command: |
| - | | + | |
| - | name: batman_adv | + | |
| - | state: present | + | |
| - | </ | + | |
| - | <file java ~/ | + | ...</file> |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: | + | |
| - | cmd: apt-key adv --keyserver hkp:// | + | |
| - | - name: " | + | <file c++ ~/ansible/roles/batman/tasks/modulloads.yml>--- |
| - | # https://docs.ansible.com/ansible/latest/modules/shell_module.html | + | |
| - | shell: | + | |
| - | cmd: apt-key adv --keyserver hkp:// | + | |
| - | | + | - name: "Laden der BATMAN Dynamic Kernel Module beim Booten sicherstellen" |
| - | # https:// | + | ansible.builtin.template: |
| - | | + | |
| - | cmd: echo "deb http://deb.debian.org/debian buster-backports main" | tee /etc/apt/ | + | dest: /etc/modules-load.d/batman-adv.module.conf |
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| - | | + | - name: "BATMAN dummy Modul laden" |
| - | # https:// | + | |
| - | | + | |
| - | | + | state: present |
| - | </ | + | |
| - | <file java ~/ | + | - name: "BATMAN-ADV Modul laden" |
| - | | + | community.general.modprobe: |
| - | | + | |
| - | apt: | + | state: present |
| - | # | + | |
| - | pkg: | + | ...</ |
| - | - bridge-utils | + | |
| - | - dnsutils | + | <file c++ ~/ansible/roles/batman/tasks/ |
| - | - vim | + | |
| - | state: present | + | |
| - | | + | - name: " |
| - | # https:// | + | ansible.builtin.apt: |
| - | | + | |
| - | | + | |
| - | pkg: | + | |
| + | - vim | ||
| + | state: present | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.apt: | ||
| + | | ||
| - batctl | - batctl | ||
| - | | + | |
| - | state: present | + | state: present |
| - | </ | + | |
| - | <file java ~/ | + | ...</ |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: | + | |
| - | cmd: batctl ra BATMAN_V | + | |
| - | </ | + | |
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | </ | + | |
| - | < | + | - name: " |
| - | - name: " | + | ansible.builtin.command: |
| - | # https:// | + | cmd: batctl ra BATMAN_V |
| - | reboot: | + | changed_when: |
| - | </ | + | |
| + | ...</file> | ||
| + | |||
| + | <file c++ ~/ | ||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.reboot: | ||
| + | |||
| + | ...</ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | # | ||
| # Load batman-adv module on system boot | # Load batman-adv module on system boot | ||
| # | # | ||
| batman-adv | batman-adv | ||
| - | dummy | + | dummy</ |
| - | </ | + | |
| - | < | + | < |
| PACKAGE_VERSION={{ batman_adv_version }} | PACKAGE_VERSION={{ batman_adv_version }} | ||
| Zeile 1178: | Zeile 860: | ||
| CLEAN="' | CLEAN="' | ||
| - | AUTOINSTALL=" | + | AUTOINSTALL=" |
| - | </ | + | |
| - | < | + | < |
| + | # interfaces(5) file used by ifup(8) and ifdown(8) | ||
| # Please note that this file is written to be used with dhcpcd | # Please note that this file is written to be used with dhcpcd | ||
| Zeile 1204: | Zeile 886: | ||
| pre-up / | pre-up / | ||
| pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | ||
| - | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | + | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' |
| - | </ | + | |
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: install.yml | - include: install.yml | ||
| - include: genkeys.yml | - include: genkeys.yml | ||
| - include: genlinklocal.yml | - include: genlinklocal.yml | ||
| - include: configuration.yml | - include: configuration.yml | ||
| - | - include: brokerinform.yml | + | - include: brokerinform.yml |
| - include: wireguardstart.yml | - include: wireguardstart.yml | ||
| + | - include: radv-filter.yml | ||
| - include: checkup.yml | - include: checkup.yml | ||
| - | </ | + | ... # YML Ende</ |
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | apt: | ||
| - | # | ||
| - | pkg: | ||
| - | - wireguard | ||
| - | state: present | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: /usr/bin/wg genkey | tee client_private.key | wg pubkey | tee client_public.key | + | |
| - | args: | + | |
| - | chdir: / | + | |
| - | creates: client_private.key | + | |
| - | | + | - name: "Installation von wireguard |
| - | # https:// | + | ansible.builtin.apt: |
| - | | + | |
| - | | + | |
| - | | + | |
| + | state: present | ||
| - | - name: " | + | ...</ |
| - | # https:// | + | |
| - | file: | + | |
| - | path: / | + | |
| - | mode: ' | + | |
| - | </ | + | |
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | shell: cat / | ||
| - | register: wg_node_linklocal | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: cat / | + | |
| - | register: wg_client_privatekey | + | |
| - | | + | - name: "Schlüsselmaterial erstellen" |
| - | | + | ansible.builtin.command: |
| - | | + | |
| - | | + | args: |
| + | | ||
| + | | ||
| - | | + | - name: "Zugriffsrechte des Private Keys anpassen" |
| - | # https:// | + | ansible.builtin.file: |
| - | | + | |
| - | ffmuc_wireguard_port: | + | |
| - | | + | |
| - | when: " | + | |
| - | | + | - name: "Zugriffsrechte |
| - | # https:// | + | ansible.builtin.file: |
| - | | + | |
| - | ffmuc_wireguard_linklocal: | + | |
| - | | + | |
| - | when: " | + | |
| - | - name: " | + | ...</file> |
| - | # https:// | + | |
| - | set_fact: | + | |
| - | ffmuc_wireguard_gwpubkey: | + | |
| - | loop: "{{ lookup(' | + | |
| - | when: " | + | |
| - | - name: " | ||
| - | # https:// | ||
| - | template: | ||
| - | src: templates/ | ||
| - | dest: / | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | | + | - name: "lokale link-local IPv6 Adresse aus dem PUBLIC-Key erzeugen" |
| - | # https:// | + | ansible.builtin.shell: |
| - | systemd: | + | cat /etc/wireguard/client_public.key | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/ |
| - | name: broker | + | |
| - | daemon_reload: yes | + | |
| - | state: started | + | |
| - | | + | |
| - | </ | + | |
| - | <file java ~/ | + | ...</ |
| - | - name: " | + | |
| - | # https:// | + | |
| - | systemd: | + | |
| - | name: wg-quick@wg-uplink | + | |
| - | daemon_reload: | + | |
| - | state: started | + | |
| - | enabled: yes | + | |
| - | </ | + | |
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | shell: cat / | + | |
| - | register: wg_node_linklocal | + | |
| - | | + | - name: "private-key einlesen und in Variable übergeben" |
| - | | + | ansible.builtin.command: |
| - | | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | | + | - name: "public-key einlesen und in Variable übergeben" |
| - | # https:// | + | ansible.builtin.command: |
| - | | + | |
| - | path: /usr/local/bin/checkup | + | register: wg_client_publickey |
| - | mode: ' | + | |
| - | | + | - name: "Socket ermitteln" |
| - | | + | ansible.builtin.set_fact: |
| - | template: | + | ffmuc_wireguard_port: |
| - | src: templates/ | + | loop: "{{ lookup(' |
| - | dest: / | + | when: " |
| - | </ | + | |
| + | - name: " | ||
| + | ansible.builtin.set_fact: | ||
| + | ffmuc_wireguard_linklocal: | ||
| + | loop: "{{ lookup(' | ||
| + | when: " | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.set_fact: | ||
| + | ffmuc_wireguard_gwpubkey: | ||
| + | loop: "{{ lookup(' | ||
| + | when: " | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.systemd: | ||
| + | name: broker | ||
| + | daemon_reload: | ||
| + | state: started | ||
| + | enabled: true | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.systemd: | ||
| + | name: wg-quick@wg-uplink | ||
| + | daemon_reload: | ||
| + | state: started | ||
| + | enabled: true | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | template: | ||
| + | | ||
| + | dest: /usr/ | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ansible/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.shell: | ||
| + | cat /etc/ | ||
| + | register: wg_node_linklocal | ||
| + | changed_when: | ||
| + | |||
| + | - name: " | ||
| + | | ||
| + | src: templates/checkup.j2 | ||
| + | dest: /usr/local/ | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.file: | ||
| + | | ||
| + | mode: ' | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| [Unit] | [Unit] | ||
| # see man systemd.unit | # see man systemd.unit | ||
| Description=Inform tunnel about our wireguard-public key | Description=Inform tunnel about our wireguard-public key | ||
| - | Documentation=https:// | + | Documentation=https:// |
| Before=wg-quick.target | Before=wg-quick.target | ||
| Zeile 1364: | Zeile 1082: | ||
| [Install] | [Install] | ||
| WantedBy=default.target | WantedBy=default.target | ||
| + | |||
| </ | </ | ||
| - | < | + | < |
| + | # Generated by Ansible on {{ ansible_date_time.date }}, do not edit manually! | ||
| # Check connectivity to supernode | # Check connectivity to supernode | ||
| Zeile 1387: | Zeile 1107: | ||
| #logger -t checkuplink " | #logger -t checkuplink " | ||
| fi | fi | ||
| + | |||
| </ | </ | ||
| - | < | + | < |
| + | # / | ||
| # Unlike any other crontab you don't have to run the `crontab' | # Unlike any other crontab you don't have to run the `crontab' | ||
| # command to install the new version when you edit this file | # command to install the new version when you edit this file | ||
| Zeile 1397: | Zeile 1119: | ||
| SHELL=/ | SHELL=/ | ||
| PATH=/ | PATH=/ | ||
| + | |||
| + | MAILTO="" | ||
| # Example of job definition: | # Example of job definition: | ||
| Zeile 1406: | Zeile 1130: | ||
| # | | | | | | # | | | | | | ||
| # * * * * * user-name command to be executed | # * * * * * user-name command to be executed | ||
| - | 17 * * * * root | + | 17 * * * * |
| - | 25 6 * * * root test -x / | + | 25 6 * * * |
| - | 47 6 * * 7 root test -x / | + | 47 6 * * 7 |
| - | 52 6 1 * * root test -x / | + | 52 6 1 * * |
| # | # | ||
| # check wireguard-connection | # check wireguard-connection | ||
| - | * * * * * root / | + | -* * * * * root / |
| + | |||
| + | # set firewall-role for RA-Filter | ||
| + | -* * * * * | ||
| </ | </ | ||
| - | < | + | < |
| PrivateKey = {{ wg_client_privatekey.stdout }} | PrivateKey = {{ wg_client_privatekey.stdout }} | ||
| Address = {{ wg_node_linklocal.stdout }} | Address = {{ wg_node_linklocal.stdout }} | ||
| Zeile 1429: | Zeile 1156: | ||
| === Rolle " | === Rolle " | ||
| - | < | + | == Tasks == |
| + | < | ||
| - include: configure.yml | - include: configure.yml | ||
| - include: vxlanstart.yml | - include: vxlanstart.yml | ||
| - | </ | + | ... # YML Ende</ |
| - | == Tasks == | + | < |
| - | < | + | |
| - | # https:// | + | |
| - | command: ip6tables -I INPUT 1 -i wg-uplink -m udp -p udp --dport 8472 -j ACCEPT | + | |
| - | | + | - name: "Paketfilter anpassen - Eingehenden |
| - | # https:// | + | ansible.builtin.command: | |
| - | set_fact: | + | |
| - | ffmuc_vxlan_id: | + | |
| - | | + | |
| - | when: " | + | |
| - | | + | - name: " |
| - | # https:// | + | ansible.builtin.set_fact: |
| - | | + | |
| - | | + | loop: "{{ lookup(' |
| - | loop: "{{ lookup(' | + | when: "ffmuc_segment |
| - | when: "ffmuc_gateway | + | |
| - | | + | - name: " |
| - | # https:// | + | ansible.builtin.set_fact: |
| - | | + | |
| - | | + | loop: "{{ lookup('dict', gw_linklocal) }}" |
| + | when: " | ||
| - | | + | - name: "lokale link-local IPv6 Adresse aus dem PUBLIC-Key erzeugen" |
| - | # https:// | + | ansible.builtin.shell: |
| - | template: | + | cat /etc/wireguard/client_public.key | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/ |
| - | src: templates/vxlan-init.j2 | + | |
| - | dest: / | + | changed_when: |
| - | | + | - name: "Startupdatei für VXLAN kopieren" |
| - | | + | template: |
| - | | + | |
| - | path: / | + | |
| - | mode: '0740' | + | |
| - | </ | + | group: root |
| + | | ||
| - | < | + | ...</ |
| - | - name: "*VXLAN* : systemd-unitfile anlegen" | + | |
| - | # https:// | + | |
| - | | + | < |
| - | src: templates/ | + | |
| - | dest: / | + | - name: " |
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | - name: "Neues Unitfile dem systemd bekannt geben" | ||
| + | ansible.builtin.systemd: | ||
| + | daemon_reload: | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.systemd: | ||
| + | name: vxlan.service | ||
| + | daemon_reload: | ||
| + | state: started | ||
| + | enabled: true | ||
| + | |||
| + | ...</ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | systemd: | ||
| - | daemon_reexec: | ||
| - | - name: " | ||
| - | # https:// | ||
| - | systemd: | ||
| - | name: vxlan.service | ||
| - | daemon_reload: | ||
| - | state: started | ||
| - | enabled: yes | ||
| - | </ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| + | [Unit] | ||
| # see man systemd.unit | # see man systemd.unit | ||
| Description=Bringing up VXLAN Interface | Description=Bringing up VXLAN Interface | ||
| - | Documentation=https:// | + | Documentation=https:// |
| After=wg-quick@wg-uplink.service | After=wg-quick@wg-uplink.service | ||
| Zeile 1507: | Zeile 1239: | ||
| [Install] | [Install] | ||
| - | WantedBy=multi-user.target | + | WantedBy=multi-user.target</ |
| - | </ | + | |
| - | < | + | < |
| + | # Generated by Ansible on {{ ansible_date_time.date }}, do not edit manually! | ||
| # Bring up VXLAN | # Bring up VXLAN | ||
| Zeile 1522: | Zeile 1255: | ||
| / | / | ||
| </ | </ | ||
| - | |||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: gitinstall.yml | - include: gitinstall.yml | ||
| - include: gitclone.yml | - include: gitclone.yml | ||
| Zeile 1536: | Zeile 1268: | ||
| </ | </ | ||
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | template: | ||
| - | src: templates/ | ||
| - | dest: / | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | </ | + | |
| - | <file java ~/ | + | - name: "Installation der Pakete git und python3-netifaces" |
| - | | + | ansible.builtin.apt: |
| - | # https:// | + | |
| - | | + | pkg: |
| - | cmd: cp /opt/ext-respondd/ | + | |
| - | </ | + | - python3-netifaces |
| + | state: present | ||
| + | |||
| + | ...</ | ||
| - | <file java ~/ | ||
| - | - name: "Repo ext-respondd klonen" | ||
| - | # https:// | ||
| - | git: | ||
| - | repo: https:// | ||
| - | dest: / | ||
| - | </ | ||
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | apt: | ||
| - | update_cache: | ||
| - | pkg: | ||
| - | - git | ||
| - | - python3-netifaces | ||
| - | state: present | ||
| - | </ | ||
| - | < | + | < |
| - | - name: "Service | + | |
| - | | + | - name: "ggf. bestehende Altlast bereinigen" |
| - | systemd: | + | |
| - | name: ext-respondd | + | path: / |
| - | daemon_reload: | + | state: absent |
| - | state: started | + | |
| - | enabled: | + | - name: "Repo ext-respondd |
| - | </ | + | ansible.builtin.git: |
| + | | ||
| + | dest: / | ||
| + | version: master | ||
| + | clone: true | ||
| + | update: true | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ansible/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.copy: | ||
| + | src: / | ||
| + | dest: / | ||
| + | remote_src: true | ||
| + | # cmd: cp / | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ansible/roles/ext-respondd/tasks/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: "Typo in der / | ||
| + | ansible.builtin.replace: | ||
| + | path: / | ||
| + | # zu ersetzende/ | ||
| + | regexp: ' | ||
| + | # wird ersetzt durch | ||
| + | replace: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | | ||
| + | name: ext-respondd | ||
| + | daemon_reload: | ||
| + | state: started | ||
| + | enabled: | ||
| + | |||
| + | ...</ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| " | " | ||
| " | " | ||
| Zeile 1608: | Zeile 1381: | ||
| }, | }, | ||
| " | " | ||
| - | } | + | }</ |
| - | </ | + | |
| <file java ~/ | <file java ~/ | ||
| Zeile 1618: | Zeile 1390: | ||
| " | " | ||
| " | " | ||
| - | } | + | }</ |
| - | </ | + | |
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: install.yml | - include: install.yml | ||
| - include: configure.yml | - include: configure.yml | ||
| - include: genconfig.yml | - include: genconfig.yml | ||
| - include: wlanbridging.yml | - include: wlanbridging.yml | ||
| - | - include: servicestartup.yml | + | - include: servicestartup.yml |
| - | </ | + | # und so das Laden der Unit Datei vom Service |
| + | # hostapd ermöglichen | ||
| + | ... # YML Ende</ | ||
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | shell: echo ' | ||
| - | when: ( raspberry_wifi == " | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | when: ( raspberry_wifi == " | + | |
| - | </ | + | |
| - | < | + | - name: "Paket hostapd für WLAN installieren" |
| - | - name: "Paket hostapd | + | ansible.builtin.apt: |
| - | | + | update_cache: |
| - | | + | pkg: |
| - | | + | - hostapd |
| - | pkg: | + | state: present |
| - | | + | |
| - | state: present | + | ...</ |
| - | | + | |
| - | </ | + | |
| + | < | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.command: | ||
| + | | ||
| + | changed_when: false | ||
| + | |||
| + | ...</file> | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | | ||
| + | src: templates/hostapd.j2 | ||
| + | dest: /etc/hostapd/hostapd.conf | ||
| + | | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: "wlan0 in Bridge packen" | ||
| + | template: | ||
| + | | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: "Service hostapd beim Booten und jetzt starten und das Laden der Unit Datei vom Service hostapd ermöglichen" | ||
| + | | ||
| + | name: hostapd | ||
| + | enabled: true | ||
| + | masked: false | ||
| + | state: started | ||
| + | |||
| + | ...</ | ||
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | systemd: | ||
| - | name: hostapd | ||
| - | enabled: yes | ||
| - | masked: no | ||
| - | state: started | ||
| - | when: ( raspberry_wifi == " | ||
| - | </ | ||
| - | <file java ~/ | ||
| - | - name: "wlan0 in Bridge packen" | ||
| - | # https:// | ||
| - | template: | ||
| - | src: templates/ | ||
| - | dest: / | ||
| - | when: ( raspberry_wifi == " | ||
| - | </ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| country_code=US | country_code=US | ||
| Zeile 1710: | Zeile 1497: | ||
| vht_oper_chwidth=1 | vht_oper_chwidth=1 | ||
| channel=36 | channel=36 | ||
| - | vht_oper_centr_freq_seg0_idx=42 | + | vht_oper_centr_freq_seg0_idx=42</ |
| - | </ | + | |
| <file java ~/ | <file java ~/ | ||
| + | # Generated by Ansible on {{ ansible_date_time.date }}, do not edit manually! | ||
| # | # | ||
| # rc.local | # rc.local | ||
| Zeile 1732: | Zeile 1520: | ||
| fi | fi | ||
| sleep 10; /sbin/brctl addif br-{{ ffmuc_segment }} wlan0 | sleep 10; /sbin/brctl addif br-{{ ffmuc_segment }} wlan0 | ||
| - | exit 0 | + | exit 0</ |
| - | </ | + | |
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| - | < | + | < |
| - include: clientohnemesh.yml | - include: clientohnemesh.yml | ||
| - include: getvxlanid.yml | - include: getvxlanid.yml | ||
| Zeile 1745: | Zeile 1532: | ||
| - include: batmanohnewifi.yml | - include: batmanohnewifi.yml | ||
| - include: batmanmitwifi.yml | - include: batmanmitwifi.yml | ||
| - | </ | + | ... # YML Ende</ |
| - | <file java ~/ | ||
| - | - name: " | ||
| - | # https:// | ||
| - | template: | ||
| - | src: templates/ | ||
| - | dest: / | ||
| - | when: ( raspberry_meshvlan|length > 0 ) and ( raspberry_wifi == " | ||
| - | </ | ||
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | when: ( raspberry_meshvlan|length > 0 ) and ( raspberry_wifi != " | + | |
| - | </ | + | |
| - | <file java ~/ | + | - name: " |
| - | --- | + | ansible.builtin.template: |
| - | | + | src: templates/ |
| - | # https:// | + | dest: / |
| - | | + | |
| - | src: templates/ | + | group: root |
| - | dest: / | + | mode: ' |
| - | when: ( raspberry_clientvlan|length > 0 ) and ( raspberry_meshvlan|length == 0 ) | + | |
| - | </ | + | |
| - | <file java ~/ | + | ...</ |
| - | - name: " | + | |
| - | # https:// | + | |
| - | set_fact: | + | |
| - | ffmuc_vxlan_id: | + | |
| - | loop: "{{ lookup(' | + | |
| - | when: " | + | |
| - | </ | + | |
| - | < | + | < |
| - | - name: " | + | |
| - | # https:// | + | |
| - | template: | + | |
| - | src: templates/ | + | |
| - | dest: / | + | |
| - | when: ( raspberry_clientvlan|length == 0 ) and ( raspberry_meshvlan|length > 0 ) | + | |
| - | </ | + | |
| - | < | + | - name: " |
| - | - name: " | + | ansible.builtin.set_fact: |
| - | | + | ffmuc_vxlan_id: |
| - | template: | + | loop: "{{ lookup(' |
| - | src: templates/ | + | when: " |
| - | dest: / | + | |
| - | when: ( raspberry_clientvlan|length > 0 ) and ( raspberry_meshvlan|length > 0 ) | + | ...</file> |
| - | </ | + | |
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | | ||
| + | dest: /etc/ | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | when: ( raspberry_clientvlan|length == 0 ) and ( raspberry_meshvlan|length > 0 ) | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ansible/roles/client-mesh/tasks/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | | ||
| + | group: root | ||
| + | mode: ' | ||
| + | | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | when: ( raspberry_meshvlan|length > 0 ) and ( raspberry_wifi != " | ||
| + | |||
| + | ...</ | ||
| + | |||
| + | |||
| + | <file c++ ~/ | ||
| + | |||
| + | - name: " | ||
| + | ansible.builtin.template: | ||
| + | src: templates/ | ||
| + | dest: / | ||
| + | owner: root | ||
| + | group: root | ||
| + | mode: ' | ||
| + | when: ( raspberry_meshvlan|length > 0 ) and ( raspberry_wifi == " | ||
| + | |||
| + | ...</ | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| + | # interfaces(5) file used by ifup(8) and ifdown(8) | ||
| # Please note that this file is written to be used with dhcpcd | # Please note that this file is written to be used with dhcpcd | ||
| Zeile 1828: | Zeile 1639: | ||
| pre-up / | pre-up / | ||
| pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | ||
| - | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | + | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' |
| - | </ | + | |
| - | < | + | < |
| + | # interfaces(5) file used by ifup(8) and ifdown(8) | ||
| # Please note that this file is written to be used with dhcpcd | # Please note that this file is written to be used with dhcpcd | ||
| Zeile 1868: | Zeile 1680: | ||
| </ | </ | ||
| - | <file java ~/ | + | |
| + | <file java ~/ | ||
| + | # interfaces(5) file used by ifup(8) and ifdown(8) | ||
| # Please note that this file is written to be used with dhcpcd | # Please note that this file is written to be used with dhcpcd | ||
| Zeile 1899: | Zeile 1713: | ||
| pre-up / | pre-up / | ||
| pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | pre-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | ||
| - | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' | + | post-up /sbin/ip link set address $(ip -br l | grep eth0 | egrep -o ' |
| - | </ | + | |
| <file bash ~/ | <file bash ~/ | ||
| + | # Generated by Ansible on {{ ansible_date_time.date }}, do not edit manually! | ||
| # | # | ||
| # rc.local | # rc.local | ||
| Zeile 1922: | Zeile 1737: | ||
| sleep 10; /sbin/brctl addif br-{{ ffmuc_segment }} wlan0 | sleep 10; /sbin/brctl addif br-{{ ffmuc_segment }} wlan0 | ||
| / | / | ||
| - | exit 0 | + | exit 0</ |
| - | </ | + | |
| <file bash ~/ | <file bash ~/ | ||
| + | # Generated by Ansible on {{ ansible_date_time.date }}, do not edit manually! | ||
| # | # | ||
| # rc.local | # rc.local | ||
| Zeile 1944: | Zeile 1760: | ||
| fi | fi | ||
| / | / | ||
| - | exit 0 | + | exit 0</ |
| - | </ | + | |
| + | /* | ||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| Zeile 2373: | Zeile 2188: | ||
| # see man systemd.unit | # see man systemd.unit | ||
| Description=Starting OLED-Trafic output | Description=Starting OLED-Trafic output | ||
| - | Documentation=https:// | + | Documentation=https:// |
| After=network.target | After=network.target | ||
| Zeile 2386: | Zeile 2201: | ||
| </ | </ | ||
| + | */ | ||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| <file java ~/ | <file java ~/ | ||
| - | - include: reboot.yml | + | - include: reboot.yml |
| - | ... #YAML Ende Syntax | + | ... # YML Ende</ |
| - | </ | + | |
| <file java ~/ | <file java ~/ | ||
| - | | + | |
| - | # https:// | + | - name: " |
| - | | + | ansible.builtin.reboot: |
| - | </ | + | |
| + | ...</ | ||
| ==== Download des auf Debian Buster basierenden Raspbian ==== | ==== Download des auf Debian Buster basierenden Raspbian ==== | ||
| Zeile 2522: | Zeile 2339: | ||
| Hier werden die zur Konfiguration benötigten Parameter nicht beim Aufruf des Playbooks abgefragt, sondern in zugehörigen **[[# | Hier werden die zur Konfiguration benötigten Parameter nicht beim Aufruf des Playbooks abgefragt, sondern in zugehörigen **[[# | ||
| - | In den Zeilen **'' | + | In der Host-spezifischen Konfigurationsdatei |
| - | $ vim ~/ | + | $ vim ~/ |
| + | |||
| + | < | ||
| + | # stationäre schwarzes Plastikgehäuse Raspberry 4B mit PoE-HAT und Display | ||
| + | # MAC: dc: | ||
| + | ansible_ssh_host: | ||
| + | ansible_port: | ||
| + | ansible_user: | ||
| + | ansible_ssh_private_key_file: | ||
| + | # | ||
| + | batman_adv_version: | ||
| + | ffmuc_segment: | ||
| + | ffmuc_gateway: | ||
| + | raspberry_hostname: | ||
| + | node_contact_address: | ||
| + | raspberry_latitude: | ||
| + | raspberry_longitude: | ||
| + | raspberry_wifi: | ||
| + | raspberry_clientvlan: | ||
| + | raspberry_meshvlan: | ||
| + | raspberry_oled: | ||
| - | < | + | Diese passen wir natürlich noch auf unsere lokale Umgebung hin an. |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| === Playbook Lauf === | === Playbook Lauf === | ||
| Zeile 2858: | Zeile 2685: | ||
| * **[[wiki: | * **[[wiki: | ||
| * **[[http:// | * **[[http:// | ||
| + | |||