类似于pip的ansible集合安装器。
撤回此版本的原因
过时
项目描述
ansible-development-environment
Ansible集合的类似pip的安装。
功能
- 推广“临时”开发方法
- 确保当前开发环境是隔离的
- 安装所有集合的Python需求
- 安装所有集合的测试需求
- 检查缺少的系统包
- 将当前集合符号链接到当前Python解释器的site-packages目录
- 将所有集合的依赖项安装到当前Python解释器的site-packages目录
通过将集合放入Python site-packages目录,它们可以由Ansible以及Python和pytest发现。
用法
设置开发环境
$ pip install ansible-development-environment --user
$ git clone <collection_repo>
$ cd <collection_repo>
$ ansible-development-environment 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
拆卸开发环境
$ ansible-development-environment 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
帮助
ansible-development-environment --help
ansible-development-environment install --help
ansible-development-environment uninstall --help
关闭
ansible-development-environment-0.3.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5a51ce7392c06583961b854798763b8ab155a4820bd0c3b62ba113917dd2c522 |
|
MD5 | d8c2289d8a59edc5268d9102672364ba |
|
BLAKE2b-256 | 348f889bb8cb84bab7444957f1d432695d1b2bdcfc67b47bba807b4a64aa5276 |
关闭
ansible_development_environment-0.3.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6f57024c75d981546eb2cb65644925a911e74f25adb4e9af317d70019f8e3400 |
|
MD5 | cb97aaf61effdf0331c1cdbb846b5651 |
|
BLAKE2b-256 | fe7c1857b7ea9a35fe190a19f089ecd3abd2372acf8783634ed8526c5db98536 |