src.nth.io/

summaryrefslogtreecommitdiff
path: root/bitcoind-prometheus-exporter/tasks/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'bitcoind-prometheus-exporter/tasks/main.yaml')
-rw-r--r--bitcoind-prometheus-exporter/tasks/main.yaml10
1 files changed, 10 insertions, 0 deletions
diff --git a/bitcoind-prometheus-exporter/tasks/main.yaml b/bitcoind-prometheus-exporter/tasks/main.yaml
index 59eed2f..5792252 100644
--- a/bitcoind-prometheus-exporter/tasks/main.yaml
+++ b/bitcoind-prometheus-exporter/tasks/main.yaml
@@ -12,6 +12,16 @@
- "prometheus_client"
- "python-bitcoinlib"
+# The exporter reads rpc credentials from bitcoin.conf, which the bitcoind
+# role keeps at 0640 bitcoin:bitcoin.
+- name: add prometheus user to the bitcoin group
+ become: yes
+ user:
+ name: "prometheus"
+ groups: "{{bitcoind_user | default('bitcoin')}}"
+ append: yes
+ notify: restart service
+
- name: unarchive bitcoind-prometheus-exporter
become: yes
unarchive: