Add Ansible playbooks for MeshCore monitoring node deployment

Roles: base (apt, tailscale, motd), meshcore_cli (pipx), meshcore_capture
(agessaman/meshcore-packet-capture + .env.local template), scripts (voltage, bandwidth).

Host vars contain per-device serial ports; group vars hold shared MQTT broker config.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
dotdavid
2026-06-08 20:33:17 +01:00
parent d567d79656
commit d8f2abfcaa
17 changed files with 366 additions and 0 deletions
@@ -0,0 +1,38 @@
---
- name: Run meshcore-packet-capture install script
shell: |
bash <(curl -fsSL https://raw.githubusercontent.com/agessaman/meshcore-packet-capture/main/install.sh)
args:
executable: /bin/bash
creates: /etc/systemd/system/meshcore-capture.service
become: false
- name: Write .env.local config
template:
src: env.local.j2
dest: "{{ ansible_env.HOME }}/.meshcore-packet-capture/.env.local"
mode: "0640"
become: false
notify: restart meshcore-capture
- name: Enable and start meshcore-capture service
systemd:
name: meshcore-capture
enabled: true
state: started
daemon_reload: true
become: true
- name: Deploy meshcore-capture-update script
copy:
content: "#!/usr/bin/env bash\nbash <(curl -fsSL https://raw.githubusercontent.com/agessaman/meshcore-packet-capture/main/install.sh)\n"
dest: "{{ ansible_env.HOME }}/meshcore-capture-update.sh"
mode: "0755"
become: false
- name: Deploy meshcore-capture-logs script
copy:
content: "#!/usr/bin/env bash\nsudo journalctl -u meshcore-capture -f\n"
dest: "{{ ansible_env.HOME }}/meshcore-capture-logs.sh"
mode: "0755"
become: false