1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

rtorrent_exporter: remove

This commit is contained in:
Matt Layher 2018-05-12 11:07:12 -04:00
parent ece2b688c4
commit 70130d189b
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
3 changed files with 0 additions and 80 deletions

View file

@ -1,60 +0,0 @@
---
- name: download and checksum rtorrent_exporter binary
tags:
- rtorrent_exporter
get_url:
url: "{{ rtorrent_exporter_url }}"
dest: "/usr/local/bin/rtorrent_exporter"
checksum: "sha256:{{ rtorrent_exporter_sha256 }}"
- name: create rtorrent_exporter user
tags:
- rtorrent_exporter
user:
name: rtorrent_exporter
shell: "/bin/false"
comment: "rtorrent_exporter service user"
- name: check if rtorrent_exporter service exists
tags:
- rtorrent_exporter
stat:
path: "/etc/systemd/system/rtorrent_exporter.service"
register: checked
- name: stop rtorrent_exporter service if it exists
tags:
- rtorrent_exporter
when: checked.stat.exists
service:
name: rtorrent_exporter
state: stopped
- name: set permissions on rtorrent_exporter binary
tags:
- rtorrent_exporter
file:
path: "/usr/local/bin/rtorrent_exporter"
owner: rtorrent_exporter
group: rtorrent_exporter
mode: 0755
- name: create rtorrent_exporter systemd unit
tags:
- rtorrent_exporter
template:
src: rtorrent_exporter.service.j2
dest: "/etc/systemd/system/rtorrent_exporter.service"
- name: reload systemd configurations
tags:
- rtorrent_exporter
command: "systemctl daemon-reload"
- name: start rtorrent_exporter service
tags:
- rtorrent_exporter
service:
name: rtorrent_exporter
state: started
enabled: yes

View file

@ -1,16 +0,0 @@
# {{ ansible_managed }}
[Unit]
Description=Prometheus rtorrent exporter
Documentation=https://github.com/mdlayher/rtorrent_exporter
Wants=network-online.target
After=network-online.target
[Service]
User=rtorrent_exporter
Group=rtorrent_exporter
Type=simple
ExecStart=/usr/local/bin/rtorrent_exporter \
-rtorrent.addr {{ rtorrent_exporter_scgi }}
[Install]
WantedBy=multi-user.target

View file

@ -1,4 +0,0 @@
---
rtorrent_exporter_url: "https://github.com/mdlayher/rtorrent_exporter/releases/download/0.1.0/rtorrent_exporter"
rtorrent_exporter_sha256: "9760092718ef0e6166a9b325a34420cfbbecdc66b0e0b992578f26a196ca3a8d"
rtorrent_exporter_scgi: "http://127.0.0.1/RPC2"