类似于pip的ansible集合安装程序。
项目描述
ansible-dev-environment
为ansible集合提供类似pip的安装。
特性
- 促进“临时”的开发方法
- 确保当前的开发环境是隔离的
- 安装所有集合的Python要求
- 安装所有集合的测试要求
- 检查缺少的系统包
- 将当前集合符号链接到当前Python解释器的site-packages中
- 将所有集合依赖项安装到当前Python解释器的site-packages中
通过将集合放入Python site-packages目录中,它们可以由ansible以及Python和pytest发现。
通讯
-
加入Ansible论坛
- 获取帮助:获取帮助或帮助他人。如果您开始新的讨论,请添加适当的标签。
- 社交空间:与同好者聚集和互动。
- 新闻与公告:跟踪全项目公告,包括社交活动。
- Bullhorn通讯:用于宣布发布和重要更改。
有关更多信息,请参阅Ansible通讯指南。
使用方法
设置开发环境
$ pip install ansible-dev-environment --user
$ git clone <collection_repo>
$ cd <collection_repo>
$ ade install -e .\[test] --venv venv
INFO: Found collection name: network.interfaces from /home/bthornto/github/network.interfaces/galaxy.yml.
INFO: Creating virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Using specified interpreter: /home/bthornto/github/network.interfaces/venv/bin/python
INFO: Requirements file /home/bthornto/github/network.interfaces/requirements.txt is empty, skipping
INFO: Installing python requirements from /home/bthornto/github/network.interfaces/test-requirements.txt
INFO: Installing ansible-core.
INFO: Initializing build directory: /home/bthornto/github/network.interfaces/build
INFO: Copying collection to build directory using git ls-files.
INFO: Running ansible-galaxy to build collection.
INFO: Running ansible-galaxy to install collection and it's dependencies.
INFO: Removing installed /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces
INFO: Symlinking /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces to /home/bthornto/github/network.interfaces
WARNING: A virtual environment was specified but has not been activated.
WARNING: Please activate the virtual environment:
source venv/bin/activate
拆除开发环境
$ ade uninstall ansible.scm
INFO Found collection name: ansible.scm from /home/bthornto/github/ansible.scm/galaxy.yml.
INFO Requirements file /home/bthornto/github/ansible.scm/requirements.txt is empty, skipping
INFO Uninstalling python requirements from /home/bthornto/github/ansible.scm/test-requirements.txt
INFO Removed ansible.utils: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/utils
INFO Removed ansible.utils*.info: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible.utils-2.10.3.info
INFO Removed ansible.scm: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/scm
INFO Removed collection namespace root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible
INFO Removed collection root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections
帮助
ade --help
ade install --help
ade uninstall --help
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
ansible_dev_environment-24.9.0.tar.gz (68.9 kB 查看散列)
构建分发
关闭
散列 for ansible_dev_environment-24.9.0-py3-none-any.whl
算法 | 散列摘要 | |
---|---|---|
SHA256 | 01a395aa6a7be08027da207c2f3a9b86107dbdbdfcd163bfcc30fd89c01bd83e |
|
MD5 | 7bf8559642438f4429731c98aac79e31 |
|
BLAKE2b-256 | 7ee8161ae21dde559d7cb3e886eae4a86ad325c88a559ba3c32bd34b1beda6ff |