3.2. 为 Ansible Automation Platform 中的 Event-Driven Ansible 构建自定义决策环境
如果您需要自定义决策环境来提供自定义维护或第三方事件源插件,请参阅本节。
先决条件
- Ansible Automation Platform > = 2.4
- Event-Driven Ansible
- Ansible Builder > = 3.0
流程
添加
de-supported决策环境。该镜像由红帽提供的基础镜像构建,名为de-minimal。注意红帽建议在 Ansible Builder 中使用 de-minimal 作为基础镜像来构建自定义决策环境。
以下是使用 de-minimal 作为基础镜像的 Ansible 构建器定义文件的示例,以使用 ansible.eda 集合构建自定义决策环境:
version: 3
images:
base_image:
name: 'registry.redhat.io/ansible-automation-platform-24/de-minimal-rhel8:latest'
dependencies:
galaxy:
collections:
- ansible.eda
python_interpreter:
package_system: "python39"
options:
package_manager_path: /usr/bin/microdnf另外,如果需要其他 python 软件包或 RPM,您可以在单个定义文件中添加以下内容:
version: 3
images:
base_image:
name: 'registry.redhat.io/ansible-automation-platform-24/de-minimal-rhel8:latest'
dependencies:
galaxy:
collections:
- ansible.eda
python:
- six
- psutil
system:
- iputils [platform:rpm]
python_interpreter:
package_system: "python39"
options:
package_manager_path: /usr/bin/microdnf