itnok.install_prometheus_node_exporter

install-prometheus-node-exporter

ビルドステータス GitHubタグ Ansibleロール

対応するホストにPrometheus Node Exporterをインストールします。

実行される手順は次のとおりです:

  • 利用可能な最新のPrometheus Node Exporterリリースを見つける (または指定されたもの)
  • Prometheus Node Exporterの最新リリースを確認する
  • 指定されたリリースのPrometheus Node ExporterのSHA256チェックサムのリストをダウンロードする
  • 指定されたリリースのPrometheus Node Exporterをダウンロードする
  • Prometheus Node Exporter用の専用システムユーザーを作成する (まだ存在しない場合)
  • {{ install_prometheus_node_exporter.name }}から'node_exporter'を抽出する
  • Prometheus Node Exporter用のsystemdサービスファイルを設定する
  • systemdにサービスの設定ファイルを再読み込みさせる
  • Prometheus Node Exporter用のsystemdサービスを有効にして再起動する

:exclamation: 要件


特になし。

:abcd: ロール変数


変数名 説明 デフォルト値
install_prometheus インストールするPrometheus Node Exporterのバージョン latest

依存関係をインストールするには、次のコマンドを使用します:

    $ ansible-galaxy install <dependecy.name>

必要なAnsibleロールのインストールは次のようにも行えます:

    $ ansible-galaxy install -r requirements.yml

:notebook: サンプルプレイブック


このロールをプレイブックで使用する方法の例を示します:

---
- hosts: servers
  remote_user: ubuntu   # オプション(リモートユーザー)
  gather_facts: yes     # オプション
  become: yes

  roles:
    - { role: itnok.install_prometheus_node_exporter }

  vars:
    install_prometheus: "latest"

:guardsman: ライセンス


MIT (詳細を読む)

プロジェクトについて

Install Prometheus Node Exporter on a supported host.

インストール
ansible-galaxy install itnok.install_prometheus_node_exporter
ライセンス
mit
ダウンロード
903
所有者