Add check-borgmatic.yml

+12
check-borgmatic.yml
···
+
---
+
- 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 }}"
+19
inventory.yml
···
+
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:
hosts:
hyperreal.coffee:
+1 -1
uptime.yml
···
ansible.builtin.shell: uptime
register: uptime
-
- debug:
+
- ansible.builtin.debug:
msg: "{{ uptime.stdout }}"