Ansibleの統合

Ansibleは、コンピュータクライアントシステムを管理するためのツールです。 詳細については、https://www.ansible.comを参照してください。

SUSE Multi-Linux Managerは、Ansible制御ノードの管理をサポートしています。 詳細については、administration:ansible-setup-control-node.adoc#at.ansible.overviewを参照してください。

The supported version for the Ansible Control Node is Ansible 11.3. It should be obtained from the operating system vendor’s official repositories. For example, on SUSE Linux Enterprise 15 SP6 and SP7, Ansible is available through the Systems Management Module. For Control Nodes running operating systems other than SUSE Linux Enterprise, use Ansible shipped together with that distribution.

Ansibleソフトウェアは、SUSE Multi-Linux ManagerプロキシおよびSUSE Multi-Linux Manager for Retailブランチサーバでも使用できます。

1. 機能の概要

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

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

  • playbookの検出

  • playbookの実行

詳細情報:

2. 要件と基本設定

To use Ansible features, you need to register the already existing Ansible Control Node to the SUSE Multi-Linux 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.

Enabling the Ansible Control Node system type ensures that the ansible package is installed on the system by adding it in the highstate and activates the Ansible features under the System Details  Ansible tab.

As the next step, configure the paths to your Ansible playbook directories and inventory files on the System Details  Ansible  Control Node page. As an inventory path, you can use the standard Ansible inventory path /etc/ansible/hosts. As a playbook directory, you can use any directory on the control node, where your playbook files are stored. A playbook directory either contains .yml files or subdirectories with .yml files.

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

3. インベントリの検査

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

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

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

4. Playbookの検出

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

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

5. Playbookの実行

You can schedule a playbook execution from the System Details  Ansible  Playbooks page. After selecting the playbook you wish to execute, you can select the inventory file for the execution from the Inventory Path drop-down menu of the Schedule Playbook Execution dialog. If you do not select any item, the default inventory configured in your Control Node will be used. The drop-down menu is populated with the inventories you defined in your Inventory paths and with inventories that have been locally discovered in your playbook directories. These are displayed as Custom Inventory items in the playbook details. You can also enter an arbitrary inventory path.

You can also pass variables to the playbook execution to override previously defined variables. To pass variables, locate the Playbook Content section and click Edit variables. In the Edit Variables dialog, you can add or edit variables as a list, dictionary, string, or boolean. Alternatively, click Edit YAML to edit the variables directly as YAML. Click Save to apply the variables to the playbook content.

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