安装 Ansible Runner
Ansible Runner 需要 Python >= 3.9,并且根据您想如何使用它,从几个不同的位置提供。
使用 pip
要从 Python 包索引安装最新版本
$ pip install ansible-runner
Fedora
要从 Fedora 仓库安装
$ dnf install python3-ansible-runner
从源代码安装
从 github 检出源代码
$ git clone git://github.com/ansible/ansible-runner
或从 releases 页面 下载
使用 Python 创建一个虚拟环境并激活它
$ virtualenv env
$ source env/bin/activate
然后安装
$ cd ansible-runner
$ pip install -e .
构建发行版
要生成 wheel 和 sdist
$ python3 -m pip install build
$ python3 -m build
仅生成可安装的 wheel
$ python3 -m build --wheel
生成发行版 tarball
$ python3 -m build --sdist