rgibert.single_binary_service
Servicio Binario Único
Descripción
Rol de Ansible para instalar un único binario como un servicio systemd.
Requisitos
- Sistema operativo basado en RHEL o Debian.
 
Variables del Rol
| Variable | Descripción | 
|---|---|
| single_binary_service_checksum | Suma de verificación del archivo descargado | 
| single_binary_service_dl_url | URL de descarga | 
| single_binary_service_exec_files | Archivos (relativos a single_binary_service_share_path) a los que se les debe dar permiso de ejecución | 
| single_binary_service_group | Grupo principal del usuario del servicio | 
| single_binary_service_name | Nombre del servicio | 
| single_binary_service_share_path | Ruta compartida para la instalación | 
| single_binary_service_start_cmd | Comando para iniciar el servicio | 
| single_binary_service_stop_cmd | Comando para detener el servicio | 
| single_binary_service_user | Usuario con el que se ejecuta el servicio | 
Dependencias
- Ninguna
 
Ejemplo de Playbook
- hosts: servers
  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
Licencia
GPLv3
Información del Autor
Richard Gibert
[email protected]
https://richard.gibert.ca/
Instalar
 ansible-galaxy install rgibert.single_binary_serviceLicencia
 
            gpl-3.0
          
Descargas
 
            364
          
Propietario
 SRE @getsentry 
