Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| linux:ansible:ffmuc-rpb4-ol [27.09.2022 15:29. ] – [Tasks] 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 1076: | Zeile 1071: | ||
| # 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 1233: | Zeile 1228: | ||
| # 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 1472: | Zeile 1467: | ||
| == Templates == | == Templates == | ||
| - | < | + | < |
| country_code=US | country_code=US | ||
| Zeile 1502: | 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 1524: | 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 1537: | 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 1620: | 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 1660: | 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 1691: | 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 1714: | 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 1736: | Zeile 1760: | ||
| fi | fi | ||
| / | / | ||
| - | exit 0 | + | exit 0</ |
| - | </ | + | |
| + | /* | ||
| === Rolle " | === Rolle " | ||
| == Tasks == | == Tasks == | ||
| Zeile 2165: | 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 2178: | 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 2314: | 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 ~/ |
| - | < | + | < |
| - | 55 ffmuc_segment: | + | # stationäre schwarzes Plastikgehäuse Raspberry 4B mit PoE-HAT und Display |
| - | 56 ffmuc_gateway: | + | # MAC: dc: |
| - | 57 raspberry_hostname: | + | ansible_ssh_host: |
| - | 58 node_contact_address: | + | ansible_port: |
| - | 59 raspberry_latitude: | + | ansible_user: |
| - | 60 raspberry_longitude: | + | ansible_ssh_private_key_file: |
| - | 61 raspberry_wifi: | + | # |
| - | 62 raspberry_clientvlan: | + | batman_adv_version: |
| - | 63 raspberry_meshvlan: | + | ffmuc_segment: |
| - | 64 raspberry_oled: | + | 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 2650: | Zeile 2685: | ||
| * **[[wiki: | * **[[wiki: | ||
| * **[[http:// | * **[[http:// | ||
| + | |||