38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
|
|
---
|
||
|
|
- name: Reload systemd daemon
|
||
|
|
systemd:
|
||
|
|
daemon_reload: yes
|
||
|
|
|
||
|
|
- name: Enable and start bitcoind service
|
||
|
|
systemd:
|
||
|
|
name: bitcoind
|
||
|
|
enabled: yes
|
||
|
|
state: started
|
||
|
|
|
||
|
|
- name: Wait for bitcoind RPC to be available
|
||
|
|
uri:
|
||
|
|
url: "http://{{ bitcoin_rpc_bind }}:{{ bitcoin_rpc_port }}"
|
||
|
|
method: POST
|
||
|
|
body_format: json
|
||
|
|
body:
|
||
|
|
jsonrpc: "1.0"
|
||
|
|
id: "healthcheck"
|
||
|
|
method: "getblockchaininfo"
|
||
|
|
params: []
|
||
|
|
user: "{{ bitcoin_rpc_user }}"
|
||
|
|
password: "{{ bitcoin_rpc_password }}"
|
||
|
|
status_code: 200
|
||
|
|
timeout: 10
|
||
|
|
register: rpc_check
|
||
|
|
until: rpc_check.status == 200
|
||
|
|
retries: 30
|
||
|
|
delay: 5
|
||
|
|
ignore_errors: yes
|
||
|
|
|
||
|
|
- name: Display RPC connection status
|
||
|
|
debug:
|
||
|
|
msg: "Bitcoin Knots RPC is {{ 'available' if rpc_check.status == 200 else 'not yet available' }}"
|
||
|
|
|
||
|
|
# ═════════════════════════════════════════════════════════════════════════
|
||
|
|
# DEPRECATED — Uptime Kuma was decommissioned on 2026-09-11.
|