rgibert.single_binary_service
Service Binaire Unique
Description
Rôle Ansible pour installer un fichier binaire unique en tant que service systemd.
Exigences
- Système d'exploitation basé sur RHEL ou Debian
Variables du Rôle
Variable | Description |
---|---|
single_binary_service_checksum | Somme de contrôle du fichier téléchargé |
single_binary_service_dl_url | URL de téléchargement cible |
single_binary_service_exec_files | Fichiers (relatifs à single_binary_service_share_path) à rendre exécutables (+x) |
single_binary_service_group | Groupe principal de l'utilisateur du service binaire unique |
single_binary_service_name | Nom du service |
single_binary_service_share_path | Chemin partagé pour l'installation |
single_binary_service_start_cmd | Commande pour démarrer le service |
single_binary_service_stop_cmd | Commande pour arrêter le service |
single_binary_service_user | Utilisateur pour exécuter le service |
Dépendances
- aucune
Exemple de Playbook
- hosts: serveurs
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
Licence
GPLv3
Informations sur l'Auteur
Richard Gibert
[email protected]
https://richard.gibert.ca/
Installer
ansible-galaxy install rgibert.single_binary_service
Licence
gpl-3.0
Téléchargements
355
Propriétaire
SRE @getsentry