Add transmission dashboard to grafana #5
3 changed files with 17 additions and 5 deletions
Add provision-indri mise task and fix idempotency
- Add mise-tasks/provision-indri script to run ansible playbook - Fix transmission_metrics launchctl load to be idempotent - Update CLAUDE.md to reference mise run provision-indri Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit
e534e59556
|
|
@ -86,10 +86,10 @@ After creating a PR, run `open <pr-url>` to open it in the browser (Claude Code'
|
|||
ansible-galaxy collection install -r ansible/requirements.yml
|
||||
|
||||
# Dry-run before committing changes
|
||||
ansible-playbook ansible/playbooks/indri.yml --check --diff
|
||||
mise run provision-indri -- --check --diff
|
||||
|
||||
# Apply changes
|
||||
ansible-playbook ansible/playbooks/indri.yml
|
||||
mise run provision-indri
|
||||
```
|
||||
|
||||
## Service Health Checks
|
||||
|
|
|
|||
|
|
@ -13,8 +13,13 @@
|
|||
mode: '0644'
|
||||
notify: reload transmission-metrics
|
||||
|
||||
- name: Ensure transmission-metrics LaunchAgent is loaded
|
||||
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.transmission-metrics.plist
|
||||
register: launchctl_load
|
||||
changed_when: launchctl_load.rc == 0
|
||||
- name: Check if transmission-metrics LaunchAgent is loaded
|
||||
ansible.builtin.command: launchctl list mcquack.eblume.transmission-metrics
|
||||
register: launchctl_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Load transmission-metrics LaunchAgent if not loaded
|
||||
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.transmission-metrics.plist
|
||||
when: launchctl_check.rc != 0
|
||||
failed_when: false
|
||||
|
|
|
|||
7
mise-tasks/provision-indri
Executable file
7
mise-tasks/provision-indri
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#MISE description="Run ansible playbook to provision indri"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd ansible
|
||||
ansible-playbook playbooks/indri.yml "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue