2021-01-08 01:02:04 +00:00
|
|
|
---
|
|
|
|
- name: ensure go/bin dir exists for bitcoind user
|
|
|
|
file:
|
|
|
|
path: /home/bitcoind/go/bin
|
|
|
|
state: directory
|
|
|
|
owner: bitcoind
|
|
|
|
group: bitcoind
|
|
|
|
mode: 0750
|
|
|
|
|
|
|
|
- name: check if lnd is installed
|
|
|
|
stat:
|
|
|
|
path: /home/bitcoind/go/bin/lnd
|
|
|
|
register: lnd_binary
|
|
|
|
|
|
|
|
- name: check lnd version
|
|
|
|
shell: /home/bitcoind/go/bin/lnd --version | cut -d ' ' -f3
|
|
|
|
when: lnd_binary.stat.exists
|
|
|
|
changed_when: False
|
|
|
|
register: lnd_installed_version
|
|
|
|
|
|
|
|
- name: update lnd
|
|
|
|
unarchive:
|
2021-01-13 01:12:49 +00:00
|
|
|
src: 'https://github.com/lightningnetwork/lnd/releases/download/v{{ lnd_version }}/lnd-linux-{{ lnd_arch }}-v{{ lnd_version }}.tar.gz'
|
2021-01-08 01:02:04 +00:00
|
|
|
dest: /home/bitcoind/go/bin/
|
|
|
|
owner: bitcoind
|
|
|
|
group: bitcoind
|
|
|
|
remote_src: True
|
|
|
|
extra_opts: [--strip-components=1]
|
|
|
|
when: (lnd_binary.stat.exists == False) or (lnd_version != lnd_installed_version)
|
|
|
|
...
|