rgibert.single_binary_service

Samodzielna Usługa Binarna

Rola Ansible Status Testu Molekuły Wynik Jakości Ansible Pobrania Ansible

Opis

Rola Ansible do instalacji pojedynczego pliku binarnego jako usługi systemd.

Wymagania

  • System operacyjny oparty na RHEL lub Debianie.

Zmienne Roli

Zmienna Opis
single_binary_service_checksum Suma kontrolna pliku do pobrania
single_binary_service_dl_url Adres docelowy do pobrania
single_binary_service_exec_files Pliki (względem single_binary_service_share_path), które mają być oznaczone jako +x
single_binary_service_group Grupa użytkowników dla single_binary_service_user
single_binary_service_name Nazwa usługi
single_binary_service_share_path Wspólna ścieżka do instalacji
single_binary_service_start_cmd Polecenie do uruchomienia usługi
single_binary_service_stop_cmd Polecenie do zatrzymania usługi
single_binary_service_user Użytkownik, który uruchamia usługę

Zależności

  • brak

Przykład Pliku Gry

- hosts: serwery
  roles:
    - rola: 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

Licencja

GPLv3

Informacje o Autorze

Richard Gibert
[email protected]
https://richard.gibert.ca/

O projekcie

Sets up a single binary as a systemd service

Zainstaluj
ansible-galaxy install rgibert.single_binary_service
Licencja
gpl-3.0
Pobrania
355
Właściciel
SRE @getsentry