From bc50600eb82c6895409b17d5b35f29017245fa6c Mon Sep 17 00:00:00 2001 From: mg Date: Sat, 15 Oct 2022 16:09:45 +0200 Subject: [PATCH] rclone: Install from Github instead with apt (#418) Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/homeserver/pulls/418 --- group_vars/fileserver.yml | 5 +++++ roles/mgrote.rclone/tasks/main.yml | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/group_vars/fileserver.yml b/group_vars/fileserver.yml index db37f11b..7eba43c8 100644 --- a/group_vars/fileserver.yml +++ b/group_vars/fileserver.yml @@ -70,3 +70,8 @@ password: "{{ lookup('keepass', 'fileserver_smb_user_brother_ads2700w', 'password') }}" - name: 'photoprism' password: "{{ lookup('keepass', 'fileserver_smb_user_photoprism', 'password') }}" + + ### mgrote.apt_manage_packages + apt_packages_internet: + - https://github.com/rclone/rclone/releases/download/v1.59.2/rclone-v1.59.2-linux-amd64.deb + - http://docker10.grote.lan:3344/bash-helper-scripts-mgrote/bash-helper-scripts-mgrote-latest.deb diff --git a/roles/mgrote.rclone/tasks/main.yml b/roles/mgrote.rclone/tasks/main.yml index e2bbfdde..94f69a38 100644 --- a/roles/mgrote.rclone/tasks/main.yml +++ b/roles/mgrote.rclone/tasks/main.yml @@ -1,10 +1,14 @@ --- - - name: install packages - become: true - ansible.builtin.apt: - name: - - rclone - state: present + - name: Check if rclone is installed + command: which rclone + changed_when: false + failed_when: rclone_installed.rc not in [0,1] + register: rclone_installed + + - name: Install rclone first! + fail: + msg: "rclone is not installed, install it first" + when: rclone_installed.rc not in [ 0 ] - name: Create rclone Directory become: true