rgibert.single_binary_service
Einzelnes Binärdienst
Beschreibung
Ansible-Rolle zur Installation einer einzelnen Binärdatei als systemd-Dienst.
Anforderungen
- RHEL- oder Debian-basierte Betriebssysteme
Rollenvariablen
Variable | Beschreibung |
---|---|
single_binary_service_checksum | Prüfziffer der heruntergeladenen Datei |
single_binary_service_dl_url | Download-Ziel |
single_binary_service_exec_files | Dateien (relativ zu single_binary_service_share_path), die +x machen |
single_binary_service_group | Hauptgruppe des Benutzers single_binary_service_user |
single_binary_service_name | Dienstname |
single_binary_service_share_path | Gemeinsamer Installationspfad |
single_binary_service_start_cmd | Befehl zum Starten des Dienstes |
single_binary_service_stop_cmd | Befehl zum Stoppen des Dienstes |
single_binary_service_user | Benutzer, unter dem der Dienst ausgeführt wird |
Abhängigkeiten
- keine
Beispiel-Playbook
- hosts: server
roles:
- role: rgibert.single_binary_service
prometheus_node_exporter_base_url: "https://github.com/prometheus/node_exporter/releases/download"
prometheus_node_exporter_dl_url: "{{ prometheus_node_exporter_base_url }}/v{{ single_binary_service_version }}/node_exporter-{{ single_binary_service_version }}.linux-{{ prometheus_node_exporter_arch }}.tar.gz"
single_binary_service_checksum: "sha256:{{ prometheus_node_exporter_base_url }}/v{{ single_binary_service_version }}/sha256sums.txt"
single_binary_service_dl_url: "{{ prometheus_node_exporter_base_url }}/v{{ single_binary_service_version }}/node_exporter-{{ single_binary_service_version }}.linux-{{ prometheus_node_exporter_arch }}.tar.gz"
single_binary_service_group: prometheus
single_binary_service_is_archive: true
single_binary_service_name: prometheus_node_exporter
single_binary_service_start_cmd: "/usr/local/share/prometheus_node_exporter-{{ single_binary_service_version }}/node_exporter-{{ single_binary_service_version }}.linux-{{ prometheus_node_exporter_arch }}/node_exporter"
single_binary_service_stop_cmd: "/usr/bin/ps auwwx | grep /usr/local/share/prometheus_node_exporter-{{ single_binary_service_version }}/node_exporter-{{ single_binary_service_version }}.linux-{{ prometheus_node_exporter_arch }}/node_exporter | grep -v grep | awk '{print $2}' | xargs kill -9"
single_binary_service_user: prometheus
single_binary_service_version: 0.18.1
prometheus_node_exporter_arch: amd64
Lizenz
GPLv3
Autorinformationen
Richard Gibert
[email protected]
https://richard.gibert.ca/
Installieren
ansible-galaxy install rgibert.single_binary_service
Lizenz
gpl-3.0
Downloads
355
Besitzer
SRE @getsentry