equal
deleted
inserted
replaced
|
1 --- |
|
2 |
|
3 - name: apt-get bitcoind-prometheus-exporter install deps |
|
4 become: yes |
|
5 apt: name="python3-pip" |
|
6 |
|
7 - name: pip bitcoind-prometheus-exporter install deps |
|
8 become: yes |
|
9 pip: name="{{item}}" |
|
10 loop: |
|
11 - "riprova" |
|
12 - "prometheus_client" |
|
13 - "python-bitcoinlib" |
|
14 |
|
15 - name: unarchive bitcoind-prometheus-exporter |
|
16 become: yes |
|
17 unarchive: |
|
18 remote_src: yes |
|
19 src: "{{bitcoind_prometheus_exporter_url}}" |
|
20 dest: "/tmp" |
|
21 creates: "/tmp/{{bitcoind_prometheus_exporter_tar_name}}/" |
|
22 notify: restart service |
|
23 |
|
24 - name: install bitcoind-prometheus-exporter |
|
25 become: yes |
|
26 copy: |
|
27 src: "/tmp/{{bitcoind_prometheus_exporter_tar_name}}/bitcoind-monitor.py" |
|
28 dest: "/usr/local/bin/bitcoind-prometheus-exporter.py" |
|
29 remote_src: yes |
|
30 owner: "root" |
|
31 group: "root" |
|
32 mode: "0755" |
|
33 changed_when: false |
|
34 |
|
35 - name: install bitcoind-prometheus-exporter service |
|
36 become: yes |
|
37 template: |
|
38 src: "bitcoind-prometheus-exporter.service.j2" |
|
39 dest: "/lib/systemd/system/bitcoind-prometheus-exporter.service" |
|
40 mode: "0644" |
|
41 notify: restart service |
|
42 |
|
43 - name: ensure bitcoind-prometheus-exporter service is started |
|
44 become: yes |
|
45 systemd: service="bitcoind-prometheus-exporter.service" enabled="yes" state="started" daemon_reload="yes" |