commit
ec0614a9a9
1
hosts
1
hosts
@ -37,6 +37,7 @@ bitcoin_rpcpassword=8BaOf-luoLM-5zA8V0ozLOtqzZZch2knK9gWIBfafDw
|
||||
bitcoin_rpcauth=n0xb0x:413f1f82906117464e662853bce33577$80a039d800184a1cffd1de5468b5b2a7442ab1d368a13782e5283e575a9f57b2
|
||||
electrs_version=0.10.2
|
||||
rtl_version=0.15.0
|
||||
rtl_password=n0xb0x
|
||||
lnbits_version=0.12.1
|
||||
zerotier_network=
|
||||
#Update wariness - 1 = very reluctant to update, 0 = eager to update
|
||||
|
||||
@ -30,6 +30,18 @@
|
||||
notify: rebuild_rtl
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Copy checkrunes.sh
|
||||
ansible.builtin.template:
|
||||
src: rtl/checkrunes.sh.j2
|
||||
dest: ~/containers/rtl/checkrunes.sh
|
||||
mode: '0700'
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Run checkrunes.sh
|
||||
ansible.builtin.command:
|
||||
cmd: ~/containers/rtl/checkrunes.sh
|
||||
creates: ~/vol/rtl/data/rtl.macaroon
|
||||
|
||||
- name: rtl - Copy rtl-node.container file
|
||||
ansible.builtin.template:
|
||||
src: rtl/rtl-node.container.j2
|
||||
@ -43,4 +55,13 @@
|
||||
dest: ~/.config/containers/systemd/rtl-node.container
|
||||
state: link
|
||||
force: true
|
||||
notify: reload_systemctl
|
||||
tags: [apps,rtl]
|
||||
|
||||
- name: rtl - Copy RTL-Config file
|
||||
ansible.builtin.template:
|
||||
src: rtl/RTL-Config.json.j2
|
||||
dest: ~/vol/rtl/RTL-Config.json
|
||||
notify: reload_systemctl
|
||||
tags: [apps,rtl]
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
"lnNode": "Core Lightning Testnet # 1",
|
||||
"lnImplementation": "CLN",
|
||||
"Authentication": {
|
||||
"runePath": "/RTL/.lightning/bitcoin"
|
||||
"runePath": "/RTL/data/rtl.macaroon"
|
||||
},
|
||||
"Settings": {
|
||||
"userPersona": "OPERATOR",
|
||||
"themeMode": "DAY",
|
||||
"themeMode": "NIGHT",
|
||||
"themeColor": "PURPLE",
|
||||
"bitcoindConfigPath": "",
|
||||
"logLevel": "INFO",
|
||||
@ -27,5 +27,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"multiPass": "n0xb0x"
|
||||
"multiPass": "{{rtl_password}}"
|
||||
}
|
||||
|
||||
|
||||
31
roles/apps/templates/rtl/checkrunes.sh.j2
Normal file
31
roles/apps/templates/rtl/checkrunes.sh.j2
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
RUNEFILE=~/vol/rtl/data/rtl.macaroon
|
||||
running=$(podman ps --filter "name=systemd-clightning-node" --format json | jq -r .[].State)
|
||||
|
||||
|
||||
if [ -e $RUNEFILE ];
|
||||
then
|
||||
echo "Macaroon $RUNEFILE already exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "$running" == "running" ]
|
||||
then
|
||||
# Its running
|
||||
checkrune=$(podman exec -it systemd-clightning-node lightning-cli showrunes | jq -r .runes[0].unique_id)
|
||||
if [ "$checkrune" -eq 0 ];
|
||||
then
|
||||
# Rune exist, get it and output to $RUNEFILE
|
||||
rune=$(podman exec -it systemd-clightning-node lightning-cli showrunes | jq -r .runes[0].rune)
|
||||
else
|
||||
# Rune doesn't exist, create it and output to $RUNEFILE
|
||||
rune=$(podman exec -it systemd-clightning-node lightning-cli createrune | jq -r .runes[0].rune)
|
||||
fi
|
||||
echo "LIGHTNING_RUNE=\"$rune\"" > $RUNEFILE
|
||||
exit 0
|
||||
else
|
||||
echo "Can't find systemd-clightning-node running."
|
||||
# exit 1
|
||||
fi
|
||||
@ -8,7 +8,6 @@ PodmanArgs=--pod bitcoin-pod
|
||||
# Use volume
|
||||
Volume=/home/{{ansible_user}}/vol/rtl/data:/RTL/data:Z
|
||||
Volume=/home/{{ansible_user}}/vol/rtl/RTL-Config.json:/RTL/RTL-Config.json:Z
|
||||
Volume=/home/{{ansible_user}}/vol/clightning:/RTL/:ro,Z
|
||||
|
||||
[Service]
|
||||
# Restart service when sleep finishes
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user