From 890d6eb2aee74cf7041b68f6bd8edff805b11b97 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Mon, 7 Apr 2025 22:39:22 -0500 Subject: [PATCH] Add check-borgmatic.yml --- check-borgmatic.yml | 12 ++++++++++++ inventory.yml | 19 +++++++++++++++++++ uptime.yml | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 check-borgmatic.yml diff --git a/check-borgmatic.yml b/check-borgmatic.yml new file mode 100644 index 0000000..cb742bf --- /dev/null +++ b/check-borgmatic.yml @@ -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 }}" diff --git a/inventory.yml b/inventory.yml index f28914e..3c79723 100644 --- a/inventory.yml +++ b/inventory.yml @@ -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: hosts: hyperreal.coffee: diff --git a/uptime.yml b/uptime.yml index a20cd77..6f09bba 100644 --- a/uptime.yml +++ b/uptime.yml @@ -6,5 +6,5 @@ ansible.builtin.shell: uptime register: uptime - - debug: + - ansible.builtin.debug: msg: "{{ uptime.stdout }}"