Add check-borgmatic.yml

This commit is contained in:
Jeffrey Serio 2025-04-07 22:39:22 -05:00
parent 712b818344
commit 890d6eb2ae
3 changed files with 32 additions and 1 deletions

12
check-borgmatic.yml Normal file
View File

@ -0,0 +1,12 @@
---
- name: Check the date of the last borgmatic archive
hosts: borgmatichosts
gather_facts: true
become: true
tasks:
- name: Get last borgmatic archive date
ansible.builtin.shell: borgmatic list | tail -n 1 | awk '{print $2,$3,$4}'
register: borgmatic_list
- ansible.builtin.debug:
msg: "{{ borgmatic_list.stdout }}"

View File

@ -1,3 +1,22 @@
borgmatichosts:
hosts:
desktop:
ansible_user: jas
ansible_host: localhost
ansible_python_interpreter: /usr/bin/python3
hyperreal.coffee:
ansible_user: jas
ansible_host: hyperreal.headscale.moonshadow.dev
ansible_python_interpreter: /usr/bin/python3
nas:
ansible_user: jas
ansible_host: nas.headscale.moonshadow.dev
ansible_python_interpreter: /usr/local/bin/python3
moonshadow:
ansible_user: jas
ansible_host: moonshadow.headscale.moonshadow.dev
ansible_python_interpreter: /usr/local/bin/python3
debianservers: debianservers:
hosts: hosts:
hyperreal.coffee: hyperreal.coffee:

View File

@ -6,5 +6,5 @@
ansible.builtin.shell: uptime ansible.builtin.shell: uptime
register: uptime register: uptime
- debug: - ansible.builtin.debug:
msg: "{{ uptime.stdout }}" msg: "{{ uptime.stdout }}"