mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-14 11:47:32 +00:00
unifi_exporter: remove
This commit is contained in:
parent
70130d189b
commit
42b3a2eed6
3 changed files with 0 additions and 114 deletions
|
@ -1,72 +0,0 @@
|
||||||
---
|
|
||||||
- name: download and checksum unifi_exporter binary
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
get_url:
|
|
||||||
url: "{{ unifi_exporter_url }}"
|
|
||||||
dest: "/tmp/unifi_exporter"
|
|
||||||
checksum: "sha256:{{ unifi_exporter_sha256 }}"
|
|
||||||
|
|
||||||
- name: create unifi_exporter user
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
user:
|
|
||||||
name: unifi_exporter
|
|
||||||
shell: "/bin/false"
|
|
||||||
comment: "unifi_exporter service user"
|
|
||||||
|
|
||||||
- name: check if unifi_exporter service exists
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
stat:
|
|
||||||
path: "/etc/systemd/system/unifi_exporter.service"
|
|
||||||
register: checked
|
|
||||||
|
|
||||||
- name: stop unifi_exporter service if it exists
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
when: checked.stat.exists
|
|
||||||
service:
|
|
||||||
name: unifi_exporter
|
|
||||||
state: stopped
|
|
||||||
|
|
||||||
- name: copy unifi_exporter binary to /usr/local/bin
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
command: "cp /tmp/unifi_exporter /usr/local/bin/"
|
|
||||||
|
|
||||||
- name: set permissions on unifi_exporter binary
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
file:
|
|
||||||
path: "/usr/local/bin/unifi_exporter"
|
|
||||||
owner: unifi_exporter
|
|
||||||
group: unifi_exporter
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: create unifi_exporter systemd unit
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
template:
|
|
||||||
src: unifi_exporter.service.j2
|
|
||||||
dest: "/etc/systemd/system/unifi_exporter.service"
|
|
||||||
|
|
||||||
- name: reload systemd configurations
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
command: "systemctl daemon-reload"
|
|
||||||
|
|
||||||
- name: start unifi_exporter service
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
service:
|
|
||||||
name: unifi_exporter
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
||||||
- name: remove temporary files
|
|
||||||
tags:
|
|
||||||
- unifi_exporter
|
|
||||||
file:
|
|
||||||
path: "/tmp/unifi_exporter"
|
|
||||||
state: absent
|
|
|
@ -1,19 +0,0 @@
|
||||||
# {{ ansible_managed }}
|
|
||||||
[Unit]
|
|
||||||
Description=Prometheus Ubiquiti UniFi exporter
|
|
||||||
Documentation=https://github.com/mdlayher/unifi_exporter
|
|
||||||
Wants=network-online.target
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=unifi_exporter
|
|
||||||
Group=unifi_exporter
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/local/bin/unifi_exporter \
|
|
||||||
-unifi.addr {{ unifi_exporter_host }} \
|
|
||||||
-unifi.username {{ unifi_exporter_username }} \
|
|
||||||
-unifi.password {{ unifi_exporter_password }} \
|
|
||||||
-unifi.insecure={{ unifi_exporter_insecure }}
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
|
@ -1,23 +0,0 @@
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
|
||||||
64306233303633393931656535323533646237306238343265613237366630326536306135656235
|
|
||||||
3963386463383134613134363437636431356664636332310a306330316164373630653539653161
|
|
||||||
34363862663563376435373539346265376132623938666463323834346538313438343066643762
|
|
||||||
3865666261616361660a616362396164393931386237623935633563386634636431363535323863
|
|
||||||
38386164363834313136646135336232313034666635396665613461383433373265336234666132
|
|
||||||
30386430373731303264383039363865373430336432363338626562383363376434326261316637
|
|
||||||
37613264626538386265616265633234316130396138616434333365656632623566343262636166
|
|
||||||
32326439386631333333303330633162343034303635373331303932373361666139663864333862
|
|
||||||
32373233366437393238373639353062353639383235393162313264323238326363636237343235
|
|
||||||
37306231366463326133636232636239383666663336366235363561363931613063636531613530
|
|
||||||
65303435633230623931306666333165313937643666393264633434346336336537326261613834
|
|
||||||
39316634633862636137323633306437396233626331626663373261653563396165346237313238
|
|
||||||
61383137393430363137653031316331373162613966333337393532343433616235346237636234
|
|
||||||
31323863623162663730663935393032366265643632323461386532663266666438393462303339
|
|
||||||
34393930333638626362613239666334633437663935623834323866323431383436393265353865
|
|
||||||
63323562636638363339333637356430323336313663303465663838646637363566343063386633
|
|
||||||
30613536313064333439333034353932653666326335656232643939633034303036313334363931
|
|
||||||
39333763653766303366616134363730626535663235393037356630393430343939383963623637
|
|
||||||
65396130306235326335333362363137363666376438383865303336366437313537626638623165
|
|
||||||
30633231363937353737353239313763393361363238666232376331346165353831376335386230
|
|
||||||
33356239326230663361363862373463363835316138613231366132313866356562393834343538
|
|
||||||
3035666235633461333563616362333630393133343665323962
|
|
Loading…
Reference in a new issue