5.2. Event-Driven Ansible のカスタム決定環境のビルド
決定環境は、Ansible ルールブックの実行に合わせてカスタマイズされた実行環境です。
Automation Controller の Ansible Playbook を実行する実行環境と同様に、決定環境は Event-Driven Ansible Controller のルールブックを実行するためのものです。
Event-Driven Ansible 用のカスタム決定環境を作成することで、デフォルトの決定環境にはない、カスタム管理またはサードパーティーのイベントソースプラグインを提供できます。
前提条件
- Ansible Automation Platform 2.5 以降
- Event-Driven Ansible
- Ansible Builder 3.0 以降
ルールブックアクティベーションの失敗を防ぐために、Ansible Automation Platform で適切な Event-Driven Ansible Controller 決定環境を使用してください。
-
Event-Driven Ansible コントローラーを Ansible Automation Platform 2.4 に接続する場合は、
registry.redhat.io/ansible-automation-platform-24/de-minimal-rhel9:latest (推奨) またはregistry.redhat.io/ansible-automation-platform-24/de-minimal-rhel8:latestを使用する必要があります。 -
Event-Driven Ansible コントローラーを Ansible Automation Platform 2.5 に接続する場合は、
registry.redhat.io/ansible-automation-platform-25/de-minimal-rhel9:latest (推奨) またはregistry.redhat.io/ansible-automation-platform-25/de-minimal-rhel8:latestを使用する必要があります。 -
Event-Driven Ansible コントローラーを Ansible Automation Platform 2.5 に接続する場合は、
registry.redhat.io/ansible-automation-platform-26/de-minimal-rhel9:latest を使用する必要があります。
-
Event-Driven Ansible コントローラーを Ansible Automation Platform 2.4 に接続する場合は、
手順
Ansible Builder で
de-minimal をベースイメージとして使用し、独自の意思決定環境を構築します。このイメージは、Ansible Automation Platform minimal decision environment で Red Hat が提供しているベースイメージからビルドされています。重要ansible.edaコレクションは、最小限のベースイメージにすでにインストールされています。Ansible Builder が再インストールを試みないようにするには、次の例に示すように、ansible.eda をexclude.all_from_collectionsリストに追加します。以下は
、de-minimal をベースイメージとして使用し、servicenow.itsmコレクションを含むカスタム意思決定環境を構築する Ansible Builder 定義ファイルの例です。version: 3 images: base_image: name: 'registry.redhat.io/ansible-automation-platform-25/de-minimal-rhel9:latest' dependencies: galaxy: collections: - name: servicenow.itsm python_interpreter: package_system: "python3.12" exclude: all_from_collections: # ansible.eda is already installed in de-minimal - ansible.eda options: package_manager_path: /usr/bin/microdnfオプション: 他の Python パッケージまたは RPM が必要な場合は、次の内容を単一の定義ファイルに追加します。
version: 3 images: base_image: name: 'registry.redhat.io/ansible-automation-platform-25/de-minimal-rhel9:latest' dependencies: galaxy: collections: - name: servicenow.itsm python: - six - psutil python_interpreter: package_system: "python3.12" exclude: all_from_collections: # ansible.eda is already installed in de-minimal - ansible.eda options: package_manager_path: /usr/bin/microdnf