Add check-borgmatic.yml
This commit is contained in:
parent
712b818344
commit
890d6eb2ae
12
check-borgmatic.yml
Normal file
12
check-borgmatic.yml
Normal 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 }}"
|
@ -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:
|
||||||
|
@ -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 }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user