2.5. 可选的 build 命令参数
-t
标志将为您的自动化执行环境镜像指定一个特定名称。例如,以下命令将构建名为 my_first_ee_image
的镜像:
ansible-builder build -t my_first_ee_image
$ ansible-builder build -t my_first_ee_image
如果有多个定义文件,您可以使用 -f
标志指定要使用的文件:
ansible-builder build -f another-definition-file.yml -t another_ee_image
$ ansible-builder build -f another-definition-file.yml -t another_ee_image
在上例中,Ansible Builder 将使用文件 another-definition-file.yml
中提供的规格,而不是默认的 execution-environment.yml
来构建名为 another_ee_image
的自动化执行环境镜像。
有关可以与 build 命令一起使用的其他规格和标志,请输入 ansible-builder build --help
来查看附加选项列表。