ansible 在EE 容器镜像中运行
yum install python python3-pip yum-utils sshpass openssh-clients tar vim -y yum install podman -y pip3 install ansible-navigator
1.创建一个目录:
mkdir my_first_ee && cd my_first_ee
2.创建一个execution-environment.yml
文件来指定要包含在图像中的依赖项。
version: 3images:base_image:name: registry.fedoraproject.org/fedora:42dependencies:python_interpreter:package_system: python3ansible_core:package_pip: ansible-coreansible_runner:package_pip: ansible-runnersystem:- openssh-clients- sshpassgalaxy:collections:- name: community.postgresql
3. 构建一个名为 的 EE 容器镜像postgresql_ee。
如果您使用 docker,请添加参数。--container-runtime docker
ansible-builder build --tag postgresql_ee
4. 列出容器镜像来验证您是否成功构建它。
[root@ansible-master my_first_ee]# podman image list
REPOSITORY