cjsteel.pip
pip
错误信息
在 Fedora Docker 镜像上
任务 [cjsteel.pip : 安装 pip3 依赖] *********************************
失败 - 正在重试: 安装 pip3 依赖 (剩余 3 次尝试)。
失败 - 正在重试: 安装 pip3 依赖 (剩余 2 次尝试)。
失败 - 正在重试: 安装 pip3 依赖 (剩余 1 次尝试)。
致命错误: [python_pip-fedora-latest]: 失败! => {"尝试次数": 3, "变化": false, "失败": ["没有可用的 python3-venv 软件包。"], "消息": "安装某些指定的软件包失败", "返回码": 1, "结果": []}
执行回顾 *********************************************************************
python_pip-fedora-latest : ok=1 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
错误:
该角色的目的是在你的系统上安装和配置 pip。
TODO: 每次提交和定期进行 单元测试。
如果你发现问题,请在 GitHub 上登记。
要在本地测试这个角色,请使用 Molecule:
# Docker 测试:
pip install molecule ara
molecule test
# Vagrant 测试
molecule test --scenario-name vagrant
有许多可用的场景,请查看 molecule/
目录。
背景
该角色是兼容角色集合的一部分。
要求
- 一个目标系统或虚拟机,需安装运行 Ansible 所需的软件包。
- 访问包含所需软件包的任何存储库。
- 最新版本的 Ansible。(使用 Ansible 2.8.2 创建)
角色变量
- pip_parameter: 值的描述。 [默认值: value]
依赖关系
- 无已知依赖。
兼容性
该角色已在以下发行版和 Ansible 版本上进行测试:
发行版 | ansible 2.8.2 | ansible 2.9. | ansible 3.0 | ansible 3.1 | ansible 开发版 |
---|---|---|---|---|---|
alpine-edge* | * | ||||
alpine-latest | * | ||||
archlinux | * | ||||
centos-6 | * | ||||
centos-latest | * | ||||
debian-latest | * | ||||
debian-stable | * | ||||
debian-unstable* | * | ||||
fedora-latest | * | ||||
fedora-rawhide* | * | ||||
opensuse-leap | * | ||||
ubuntu-artful | * | ||||
ubuntu-devel* | * | ||||
ubuntu-latest | * |
单个星号表示构建可能会失败,标记为实验性构建。
示例剧本
---
- name: pip
hosts: all
gather_facts: no
become: yes
roles:
- role: cjsteel.bootstrap
- role: cjsteel.pip
pip_parameter: value
要安装此角色:
- 使用
ansible-galaxy install cjsteel.pip
单独安装此角色。
示例 roles/requirements.yml: (使用 ansible-galaxy install -r roles/requirements.yml
安装)
---
- name: cjsteel.bootstrap
- name: cjsteel.pip
测试
molecule 测试、no_log 和 debug 选项
你需要设置环境变量 MOLECULE_DEBUG
以记录错误,或者你可以通过使用 --debug
标志手动调试。以下是针对 vagrant molecule 场景的示例:
molecule --debug create -s vagrant
许可
Apache 许可证,版本 2.0
作者信息
Christopher Steel chris.steel@gmail.com
该角色是使用 Robert de Bock 的优秀 ansible-role-skeleton 的修改版本生成的。
请查看 Robert 的个人网站,了解许多优质、与 Linux 发行版及版本无关的角色示例。
其他优秀的公共 Ansible 角色集合:
关于项目
Install and configure pip on your system.
安装
ansible-galaxy install cjsteel.pip
许可证
apache-2.0
下载
136
拥有者
These repositories are under heavy development. Some less dynamic projects are available at https://github.com/csteel