From 14e57e36800671dfc18a043bc78c092bc0fe5799 Mon Sep 17 00:00:00 2001 From: Asara Date: Thu, 29 Jul 2021 23:48:23 -0400 Subject: [PATCH] Remove lncli/lnd before unarchiving --- ansible/roles/lnd/tasks/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/roles/lnd/tasks/main.yml b/ansible/roles/lnd/tasks/main.yml index aa76ba8..4ca075e 100644 --- a/ansible/roles/lnd/tasks/main.yml +++ b/ansible/roles/lnd/tasks/main.yml @@ -24,9 +24,17 @@ state: stopped when: (lnd_binary.stat.exists == False) or (lnd_version != lnd_installed_version.stdout) +- name: remove old lnd files + file: + name: "/home/bitcoind/go/bin/{{ item }}" + state: absent + with_items: + - lncli + - lnd + - name: update lnd unarchive: - src: 'https://github.com/lightningnetwork/lnd/releases/download/v{{ lnd_version }}/lnd-linux-{{ lnd_arch }}-v{{ lnd_version }}.tar.gz' + src: "https://github.com/lightningnetwork/lnd/releases/download/v{{ lnd_version }}/lnd-linux-{{ lnd_arch }}-v{{ lnd_version }}.tar.gz" dest: /home/bitcoind/go/bin owner: bitcoind group: bitcoind