Ansible collection that converges MeshCore repeaters through a companion radio (TCP, USB serial or BLE): admin ACL, CLI prefs, region tree, firmware facts, companion remote-CLI ACL, and the meshcore-tth extras (BLE on/off and own BLE PIN, channel-hash filter, message age, advert fairness). Every change is read, diffed, sent and read back; --check only reads. ansible-test sanity, unit tests and a galaxy build in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
0a4cfafc78
27 files changed
+3195
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# Example: one repeater, managed over RF through an openHop TCP companion on
|
||||
# the host "observer". Copy, fill in, keep the password in ansible-vault.
|
||||
all:
|
||||
hosts:
|
||||
observer:
|
||||
ansible_host: observer.example.org
|
||||
ansible_python_interpreter: /opt/meshcore-venv/bin/python # has `meshcore`
|
||||
children:
|
||||
meshcore_repeaters:
|
||||
vars:
|
||||
ansible_connection: local
|
||||
mc_via: observer
|
||||
mc_transport:
|
||||
type: tcp
|
||||
host: 127.0.0.1
|
||||
port: 5000 # TCP port of your companion
|
||||
expect_freq: 869.432 # nothing is sent when the companion is elsewhere
|
||||
hosts:
|
||||
my-repeater:
|
||||
mc_target: 0000000000000000000000000000000000000000000000000000000000000000 # full pubkey
|
||||
mc_admins:
|
||||
- 1111111111111111111111111111111111111111111111111111111111111111 # the companion above
|
||||
- 2222222222222222222222222222222222222222222222222222222222222222 # your phone
|
||||
mc_prefs:
|
||||
path.hash.mode: 1
|
||||
advert.interval: 0 # minutes
|
||||
flood.advert.interval: 47 # hours
|
||||
mc_regions:
|
||||
- {name: cz}
|
||||
- {name: cz-ulk, parent: cz}
|
||||
mc_region_home: cz-ulk
|
||||
@@ -0,0 +1,48 @@
|
||||
# ansible-playbook -i inventory.yml repeaters.yml --check --diff # what would change
|
||||
# ansible-playbook -i inventory.yml repeaters.yml --diff # apply
|
||||
- name: MeshCore repeaters
|
||||
hosts: meshcore_repeaters
|
||||
gather_facts: false
|
||||
serial: 1 # RF: one repeater at a time
|
||||
vars:
|
||||
meshcore_admin_password: "{{ vault_meshcore_admin_password }}"
|
||||
tasks:
|
||||
- name: Admin ACL
|
||||
tth.meshcore.meshcore_acl:
|
||||
transport: "{{ mc_transport }}"
|
||||
target: "{{ mc_target }}"
|
||||
password: "{{ meshcore_admin_password }}"
|
||||
admins: "{{ mc_admins }}"
|
||||
delegate_to: "{{ mc_via }}"
|
||||
when: mc_admins is defined
|
||||
tags: [acl]
|
||||
|
||||
- name: Prefs
|
||||
tth.meshcore.meshcore_prefs:
|
||||
transport: "{{ mc_transport }}"
|
||||
target: "{{ mc_target }}"
|
||||
password: "{{ meshcore_admin_password }}"
|
||||
prefs: "{{ mc_prefs }}"
|
||||
delegate_to: "{{ mc_via }}"
|
||||
when: mc_prefs is defined
|
||||
tags: [prefs]
|
||||
|
||||
- name: Regions
|
||||
tth.meshcore.meshcore_region:
|
||||
transport: "{{ mc_transport }}"
|
||||
target: "{{ mc_target }}"
|
||||
password: "{{ meshcore_admin_password }}"
|
||||
regions: "{{ mc_regions }}"
|
||||
home: "{{ mc_region_home | default(omit) }}"
|
||||
default_scope: "{{ mc_default_scope | default(omit) }}"
|
||||
delegate_to: "{{ mc_via }}"
|
||||
when: mc_regions is defined
|
||||
tags: [regions]
|
||||
|
||||
- name: Firmware version
|
||||
tth.meshcore.meshcore_fw_facts:
|
||||
transport: "{{ mc_transport }}"
|
||||
target: "{{ mc_target }}"
|
||||
password: "{{ meshcore_admin_password }}"
|
||||
delegate_to: "{{ mc_via }}"
|
||||
tags: [ver]
|
||||
Reference in new issue
Block a user