Add borgmatic role to ansible playbook
Manages scheduled LaunchAgent for daily backups at 2:00 AM. Borgmatic itself is installed via mise (pipx), not managed by ansible. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6977197c98
commit
d761e61809
5 changed files with 60 additions and 0 deletions
16
ansible/roles/borgmatic/tasks/main.yml
Normal file
16
ansible/roles/borgmatic/tasks/main.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
# Note: borgmatic is installed via mise (pipx), not managed here.
|
||||
# This role manages only the scheduled LaunchAgent.
|
||||
|
||||
- name: Deploy borgmatic LaunchAgent plist
|
||||
ansible.builtin.template:
|
||||
src: borgmatic.plist.j2
|
||||
dest: ~/Library/LaunchAgents/mcquack.eblume.borgmatic.plist
|
||||
mode: '0644'
|
||||
notify: reload borgmatic
|
||||
|
||||
- name: Ensure borgmatic LaunchAgent is loaded
|
||||
ansible.builtin.command: launchctl load ~/Library/LaunchAgents/mcquack.eblume.borgmatic.plist
|
||||
register: launchctl_load
|
||||
changed_when: launchctl_load.rc == 0
|
||||
failed_when: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue