/
/
/
Ansible role that deploys my edge device with connectivity containers. Currently it deploys a thread border router via the zbt-1 dongle by Home Assistant, a zigbee2MQTT interface using the Sonoff zigbee dongle and a DSMR reader with a generic P1 to USB converter.
1---
2- name: Set timezone
3 ansible.builtin.timezone:
4 name: "{{ ha_edge_timezone }}"
5
6- name: Ensure common packages
7 ansible.builtin.apt:
8 name: "{{ packages_common }}"
9 state: present
10 update_cache: true
11
12- name: Ensure Docker engine & compose
13 ansible.builtin.apt:
14 name: "{{ docker_pkgs }}"
15 state: present
16 update_cache: true
17
18- name: Add user to docker group
19 ansible.builtin.user:
20 name: "{{ ha_edge_user }}"
21 groups: "{{ ha_edge_groups }}"
22 append: true
23
24# Enable IPv6 forwarding (needed for Thread BR + border routing)
25- name: Enable IPv6 forwarding
26 ansible.builtin.copy:
27 dest: /etc/sysctl.d/99-ha-edge-ipv6.conf
28 content: |
29 net.ipv6.conf.all.disable_ipv6 = 0
30 net.ipv6.conf.default.disable_ipv6 = 0
31 net.ipv6.conf.all.forwarding = 1
32 notify: Reload sysctl
33
34- name: Apply sysctl now
35 ansible.builtin.command: sysctl --system
36 changed_when: false
37
38