Added rpcuser and rpcpassword options to bitcoin-node startup
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
---
|
||||
# handlers file for build
|
||||
#
|
||||
- name: restart_bitcoin
|
||||
ansible.builtin.systemd_service:
|
||||
name: bitcoin-node.service
|
||||
scope: user
|
||||
state: restarted
|
||||
|
||||
- name: rebuild_bitcoin
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/Containers/bitcoin
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
- "4224:4224"
|
||||
- "127.0.0.1:8332:8332"
|
||||
- "8333:8333"
|
||||
- "9735:9735"
|
||||
|
||||
- name: bitcoin - Create bitcoin data / conf directory
|
||||
ansible.builtin.file:
|
||||
@@ -26,7 +27,9 @@
|
||||
ansible.builtin.template:
|
||||
src: bitcoin/bitcoin-node.container.j2
|
||||
dest: /home/{{ ansible_user }}/.config/containers/systemd/bitcoin-node.container
|
||||
notify: reload_systemctl
|
||||
notify:
|
||||
- reload_systemctl
|
||||
- restart_bitcoin
|
||||
|
||||
- name: bitcoin - Create Containers/bitcoin Dir
|
||||
ansible.builtin.file:
|
||||
@@ -54,8 +57,8 @@
|
||||
notify: rebuild_bitcoin
|
||||
|
||||
- name: bitcoin - Copy btc_oneshot
|
||||
ansible.builtin.copy:
|
||||
src: bitcoin/bin/btc_oneshot
|
||||
ansible.builtin.template:
|
||||
src: bitcoin/bin/btc_oneshot.j2
|
||||
dest: ~/Containers/bitcoin/bin/btc_oneshot
|
||||
notify: rebuild_bitcoin
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ btc_init
|
||||
if [ $# -eq 0 ]; then
|
||||
# If IPv6 is in the container do both:
|
||||
#set -- '-rpcbind=[::]:8332' '-rpcallowip=::/0' '-rpcallowip=0.0.0.0/0'
|
||||
set -- '-rpcbind=:8332' '-rpcallowip=0.0.0.0/0'
|
||||
set -- '-rpcbind=:8332' '-rpcallowip=0.0.0.0/0' '-rpcuser={{bitcoin_rpcuser}}' '-rpcpassword={{bitcoin_rpcpassword}}'
|
||||
fi
|
||||
|
||||
exec bitcoind "$@"
|
||||
Reference in New Issue
Block a user