1.2.4. 自動化メッシュノードタイプの定義
このセクションの例は、インベントリーファイルでホストのノードタイプを設定する方法を示しています。
コントロールプレーンまたは実行プレーンインベントリーグループ内の単一ノードの node_type を設定できます。ノードのグループ全体のノードタイプを定義するには、グループの vars スタンザで node_type を設定します。
-
コントロールプレーン
[automationcontroller]グループのnode_typeに許可される値は、hybrid(デフォルト) とcontrolです。 -
[execution_nodes]グループのnode_typeに許可される値は、execution(デフォルト) とhopです。
ハイブリッドノード
次のインベントリーは、コントロールプレーンの単一のハイブリッドノードで構成されています。
[automationcontroller]
control-plane-1.example.com
コントロールノード
次のインベントリーは、コントロールプレーンの単一のコントロールノードで構成されています。
[automationcontroller]
control-plane-1.example.com node_type=control
コントロールプレーンノードの vars スタンザで node_type を control に設定すると、コントロールプレーン内のすべてのノードがコントロールノードになります。
[automationcontroller]
control-plane-1.example.com
[automationcontroller:vars]
node_type=control
実行ノード
次のスタンザは、実行プレーンで単一の実行ノードを定義します。
[execution_nodes]
execution-plane-1.example.com
ホップノード
次のスタンザは、実行プレーン内の単一のホップノードと実行ノードを定義します。node_type 変数は、個々のノードごとに設定されます。
[execution_nodes]
execution-plane-1.example.com node_type=hop
execution-plane-2.example.com
グループレベルで ノードタイプ を設定する場合は、実行ノードとホップノード用にそれぞれ別のグループを作成する必要があります。
[execution_nodes]
execution-plane-1.example.com
execution-plane-2.example.com
[execution_group]
execution-plane-2.example.com
[execution_group:vars]
node_type=execution
[hop_group]
execution-plane-1.example.com
[hop_group:vars]
node_type=hop
Ansible Automation Platform のコンテナーベースのインストールでは、peers= の代わりに receptor_peers= 変数を使用します。
receptor_peers の値は、ホスト名をコンマで区切ったリストである必要があります。インベントリーグループ名は使用しないでください。詳細は、実行ノードの追加を 参照してください。
peers= ホスト変数を使用して、ノード間の接続を作成します。以下の例では、control-plane-1.example.com を execution-node-1.example.com に、execution-node-1.example.com を execution-node-2.example.com に、それぞれ接続します。
[automationcontroller]
control-plane-1.example.com peers=execution-node-1.example.com
[automationcontroller:vars]
node_type=control
[execution_nodes]
execution-node-1.example.com peers=execution-node-2.example.com
execution-node-2.example.com