Documentation survey

Ansibleの統合

Ansible is a tool to manage computer client systems. For more information, see https://www.ansible.com.

SUSE Manager supports managing Ansible control nodes. For more information, see administration:ansible-setup-control-node.adoc#at.ansible.overview.

Currently, the supported version of Ansible is 2.9 (LTS) shipped in SUSE Linux Enterprise 15 Client Tools channels. The supported OS version for the Ansible Control Node is SUSE Linux Enterprise Server 15 SP3, or later. Ansible software is also available for SUSE Manager Proxy and SUSE Manager for Retail Branch Server. For Control Nodes running operating systems other than SUSE Linux Enterprise, use Ansible shipped together with your distribution.

1. 機能の概要

SUSE Managerでは、システム管理者がAnsible制御ノードを操作できます。 サポートされる機能は次のとおりです。

  • インベントリファイルの検査

  • playbookの検出

  • playbookの実行

詳細情報:

2. 要件と基本設定

To use Ansible features, you need to register the already existing Ansible Control Node to the SUSE Manager Server. In the Web UI, on the System Details  Properties page of the registered system, you must enable the Ansible Control Node system type of the Add-on System Types list.

Ansible制御ノードシステムタイプを有効にすると、highstateに追加してansibleパッケージがシステムにインストールされ、システムの詳細  AnsibleタブでAnsible機能が有効になります。

次のステップとして、システムの詳細  Ansible  制御ノードページでAnsible playbookディレクトリおよびインベントリファイルへのパスを設定します。 インベントリパスとして、標準のAnsibleインベントリパス/etc/ansible/hostsを使用できます。 playbookディレクトリとして、playbookファイルが保存されている制御ノード上の任意のディレクトリを使用できます。 playbookディレクトリには、.ymlファイルが含まれているか、.ymlファイルを持つサブディレクトリが含まれています。

Ansible制御ノードのインストールと設定については、Ansible制御ノードのセットアップを参照してください。

3. インベントリの検査

インベントリパスを定義した後、SUSE Managerを使用してその内容を検査できます。

プロシージャ: Web UIからのインベントリの検査
  1. SUSE Manager Web UIで、システムの詳細  Ansible  インベントリに移動します

  2. インベントリパスをクリックして、制御ノードのインベントリ検査をリアルタイムで実行します。

4. Playbookの検出

playbookディレクトリを定義した後で、システムの詳細  Ansible  playbookページでplaybookを検出できます。

インベントリの検査と同様に、playbookの検出操作は制御ノード上でリアルタイムに実行されます。

5. Playbookの実行

playbookの実行は、システムの詳細  Ansible  playbookページからスケジュールできます。 実行するplaybookを選択した後で、[playbookの実行のスケジュール]ダイアログの[インベントリパス]ドロップダウンメニューから実行するインベントリファイルを選択できます。 項目を選択しない場合は、制御ノードで設定されているデフォルトのインベントリが使用されます。 ドロップダウンメニューには、インベントリパスで定義したインベントリと、playbookディレクトリでローカルに検出されたインベントリが表示されます。 これらは、playbookの詳細に[カスタムインベントリ]項目として表示されます。 任意のインベントリパスを入力することもできます。

その後、playbookの実行時刻を選択するか、動作チェーンを選択します。 最終的に、SUSE Managerは制御ノードで動作としてplaybookを実行します。 操作の結果は、動作の詳細ページに表示されます。