ipr-cnrs.fusioninventory

FusionInventory

fusioninventory-agentはもはやメンテナンスされていませんので、「新しい」glpi-agentロールを使用することを検討してください。

  1. 概要
  2. ロール変数
  3. 例のプレイブック
  4. 設定
  5. 開発
  6. ライセンス
  7. 著者情報

概要

FusionInventoryエージェントのインストールと設定を管理するためのロールです。

ロール変数

  • fusioninventory__agent_version:インストールするFusionInventoryエージェントのバージョン [デフォルト:2.6-1].
  • fusioninventory__agent_depend_packages:インストールする依存パッケージのリスト。
  • fusioninventory__agent_recommend_packages:インストールする推奨パッケージのリスト。
  • fusioninventory__agent_extra_packages:インストールする追加のパッケージのリスト(例:Ansibleから.debファイルからのインストールを許可するため)。
  • fusioninventory__agent_package_url:FusionInventoryエージェントのdebパッケージをダウンロードするために使用されるURL [デフォルト: "https://github.com/fusioninventory/fusioninventory-agent/releases/download/" + fusioninventory__agent_major_version + "/fusioninventory-agent_" + fusioninventory__agent_version + "_all.deb" Debian Stretch専用].
  • fusioninventory__agent_deploy_state:このロールが達成すべき望ましい状態 [デフォルト:present].
  • fusioninventory__agent_service_name:管理するサービス名 [デフォルト:fusioninventory-agent].
  • fusioninventory__agent_service_manage:FusionInventoryエージェントサービスを管理する必要があるか [デフォルト:true].
  • fusioninventory__agent_conf_src:エージェント設定ファイルを提供するために使用されるテンプレート [デフォルト:../templates/etc/fusioninventory/agent.cfg.j2].
  • fusioninventory__agent_service_status:サービスの状態、開始、停止、再起動、リロードが可能 [デフォルト:started].
  • fusioninventory__agent_service_enabled:サービスのステータス、有効にできるか(true)または無効にできるか(false) [デフォルト:true].

Cron変数

  • fusioninventory__agent_conf_cron:エージェントを実行するcronジョブを有効("present")または無効("absent")にします [デフォルト:"absent"].
  • fusioninventory__agent_conf_cron_day:エージェントを実行する曜日 [デフォルト:"*"].
  • fusioninventory__agent_conf_cron_hour:エージェントを実行する時間 [デフォルト:"23"].
  • fusioninventory__agent_conf_cron_minute:エージェントを実行する分 [デフォルト:"0"].
  • fusioninventory__agent_conf_cron_month:エージェントを実行する月 [デフォルト:"*"].
  • fusioninventory__agent_conf_cron_weekday:エージェントを実行する曜日 [デフォルト:"*"].
  • fusioninventory__agent_conf_cron_user:エージェントを実行するユーザー [デフォルト:"root"].
  • fusioninventory__agent_conf_command:cronが実行するコマンド [デフォルト:"sleep $(( RANDOM \\% 3600 )); /usr/bin/fusioninventory-agent"].

特定の設定変数

AnsibleテンプレートからFusionInventoryエージェントのcfgファイルを生成するために使用されるいくつかの変数:

  • fusioninventory__agent_conf_server_url:あなたのFusionInventoryサーバー/GLPI/...のURL [デフォルト:``].
  • fusioninventory__agent_conf_local_dir:タスクの結果を書き込むディレクトリ [デフォルト:``].
  • fusioninventory__agent_conf_no_task:指定されたタスクを実行しない(カンマで区切る) [デフォルト:``].
  • fusioninventory__agent_conf_tasks:指定された順序で指定されたタスクを実行する(カンマで区切る) [デフォルト:``].
  • fusioninventory__agent_conf_delaytime:最初のターゲット前に初期遅延を設定 [デフォルト:3600].
  • fusioninventory__agent_conf_no_category:指定されたカテゴリのアイテムをインベントリタスクにリストしない(カンマで区切る) [デフォルト:``].
  • fusioninventory__agent_conf_scan_homedirs:ユーザーホームディレクトリのスキャンを有効にする [デフォルト:false].
  • fusioninventory__agent_conf_scan_profiles:ユーザーリストのスキャンを有効にする [デフォルト:false].
  • fusioninventory__agent_conf_no_ssl_check:サーバーのSSL証明書のチェックを無効にする [デフォルト:false].
  • fusioninventory__agent_conf_no_httpd:組み込みウェブサーバーを無効にする [デフォルト:true].
  • fusioninventory__agent_conf_httpd_ip:ウェブサーバーがリッスンすべきインターフェイス/IP [デフォルト:``].
  • fusioninventory__agent_conf_httpd_port:ウェブサーバーがリッスンするために使用されるTCPポート [デフォルト:62354].
  • fusioninventory__agent_conf_httpd_trust:HTTPリクエストが許可されるホスト名またはIPまたはサブネット [デフォルト:``].
  • fusioninventory__agent_conf_log_logger:使用するロガーバックエンドを指定 [デフォルト:syslog].
  • fusioninventory__agent_conf_log_facility:syslogロガーバックエンドに使用するsyslog施設を指定 [デフォルト:LOG_DAEMON].
  • fusioninventory__agent_conf_log_file:ファイルロガーバックエンドに使用するファイルを指定 [デフォルト:/var/log/fusioninventory.log].
  • fusioninventory__agent_conf_log_file_maxsize:ログファイルの最大サイズをMB単位で指定 [デフォルト:0].
  • fusioninventory__agent_conf_log_color:stderrロガーバックエンドのカラー表示を有効にする [デフォルト:false].
  • fusioninventory__agent_conf_tag:インベントリの結果に指定されたタグを追加 [デフォルト:``].
  • fusioninventory__agent_conf_debug:デバッグモードを有効にする必要があるか [デフォルト:false].

例のプレイブック

  • デフォルトの変数を使用する:
- hosts: mynode.DOMAIN
  roles:
    - role: ipr-cnrs.fusioninventory
      tags: ['role::fusioninventory', 'ipr', 'inventory']
  • リポジトリからFusionInventoryエージェントをインストールする(Debian Stretchでは利用できず、すべての他のリリースではデフォルトで):
- hosts: mynode.DOMAIN
  roles:
    - role: ipr-cnrs.fusioninventory
      fusioninventory__agent_package_url: ''
      tags: ['role::fusioninventory', 'ipr', 'inventory']

設定

このロールは次のことを行います:

  • FusionInventoryエージェントの必要な依存パッケージをインストールします。
  • インストール後、依存関係は削除されません。
  • 公式プロジェクトパッケージ/URLからFusionInventoryエージェントパッケージをインストールします。
  • エージェントの設定ファイルを生成します。
  • エージェントのsystemdサービスを管理します。

開発

このソースコードは私たちのGogsインスタンスから来ており、GithubリポジトリはAnsible Galaxyにロールを送信できるように存在します…

問題やプルリクエストを自由に送ってください :)

このフックのおかげで、Githubは自動的に私たちのGogsインスタンスから更新を受け取ります :)

ライセンス

WTFPL

著者情報

ジェレミー・ガルダイス

プロジェクトについて

Manage FusionInventory Agent

インストール
ansible-galaxy install ipr-cnrs.fusioninventory
ライセンス
Unknown
ダウンロード
1.6k
所有者
Institut de Physique de Rennes https://ipr.univ-rennes1.fr/ Tutelles CNRS et Université Rennes 1