rgibert.single_binary_service
シングルバイナリサービス
説明
システムdサービスとしてシングルバイナリをインストールするAnsibleロールです。
要件
- RHELベースまたはDebianベースのOS
ロール変数
変数名 | 説明 |
---|---|
single_binary_service_checksum | ダウンロードファイルのチェックスム |
single_binary_service_dl_url | ダウンロード先 |
single_binary_service_exec_files | +xにするファイル(single_binary_service_share_pathに対して相対) |
single_binary_service_group | single_binary_service_userの主グループ |
single_binary_service_name | サービス名 |
single_binary_service_share_path | インストール先の共有パス |
single_binary_service_start_cmd | サービスを開始するコマンド |
single_binary_service_stop_cmd | サービスを停止するコマンド |
single_binary_service_user | サービスを実行するユーザー |
依存関係
- なし
例 プレイブック
- 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
ライセンス
GPLv3
著者情報
インストール
ansible-galaxy install rgibert.single_binary_service
ライセンス
gpl-3.0
ダウンロード
355
所有者
SRE @getsentry