From 99daaf72c3a14f4d3dce53e9bb7d807adbd30cf3 Mon Sep 17 00:00:00 2001 From: FuzzyMistborn Date: Thu, 7 Oct 2021 21:26:30 -0400 Subject: [PATCH] Add check --- README.md | 1 + defaults/main.yml | 7 ++++--- tasks/configure.yml | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b73ece..3ec6e3c 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ For additional documentation, please see the [official docs](https://autorestic. ## To Do - Add cronjob variables (?) for basic tasks (backup, forget, etc). + - Don't think I will implement. Too personalized and too much variety in how to do. Will keep trying to think up a way. - ~~Find a way to pin restic even if updating autorestic.~~ ### If you appreciate my work, please consider buying me a beer (or cofee, or whatever) diff --git a/defaults/main.yml b/defaults/main.yml index 8c942f9..8b4ebc4 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- -### Restic +### Restic Install restic_download_latest_ver: true # Change to 'false' to pin to a specific version restic_pinned_ver: 0.12.1 # Overriden by 'autorestic_download_latest_ver' variable restic_distro: linux_amd64 @@ -11,7 +11,7 @@ restic_download_directory: "/tmp/restic" restic_install_directory: /usr/local/bin restic_install_path: "{{ restic_install_directory }}/restic" -### Autorestic +### Autorestic Install autorestic_download_latest_ver: true # Change to 'false' to pin to a specific version autorestic_pinned_ver: 1.2.0 # Overriden by 'autorestic_download_latest_ver' variable autorestic_distro: linux_amd64 @@ -28,4 +28,5 @@ autorestic_config_yaml: CHANGEME # autorestic configuration in yaml autorestic_config_path: "{{ autorestic_user_directory }}/.autorestic.yml" autorestic_config_mode: 0600 autorestic_config_owner: "{{ autorestic_config_user }}" -autorestic_config_group: "{{ autorestic_config_user }}" \ No newline at end of file +autorestic_config_group: "{{ autorestic_config_user }}" +autorestic_run_check: true \ No newline at end of file diff --git a/tasks/configure.yml b/tasks/configure.yml index 65022cf..7c26575 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -18,3 +18,7 @@ mode: "{{ autorestic_config_mode }}" when: autorestic_config_yaml != "CHANGEME" become: true + +- name: update autorestic binary + command: "{{ autorestic_install_path }} check -c {{ autorestic_install_path }}" + when: autorestic_run_check == true \ No newline at end of file