包含'boo' Ansible模块的示例Ansible集合
项目描述
ansible-collections.python.dist.boo:包含boo模块的Ansible集合
这是一个将Ansible集合(Ansible集合 python.dist)打包为Python分发包的演示。它只包含一个名为boo的Ansible模块。由于这个分发包和Ansible被安装到同一个(虚拟)环境中,所以可以通过FQDN python.dist.boo从Ansible中访问。以下是您如何以ad-hoc风格调用它的方法
$ PYTHONPATH=`pwd` ansible -m python.dist.boo -a name=Bob localhost [WARNING]: No inventory was parsed, only implicit localhost is available localhost | SUCCESS => { "changed": false, "greeting": "Hello, Bob!", "msg": "Greeting Bob completed." }
或者,安装它,而不是与PYTHONPATH作斗争
$ pip install ansible-collections.python.dist.boo $ ansible -m python.dist.boo -a name=Bob localhost [WARNING]: No inventory was parsed, only implicit localhost is available localhost | SUCCESS => { "changed": false, "greeting": "Hello, Bob!", "msg": "Greeting Bob completed." }
目的
在发布此项目时,此演示仅适用于由Ansible PR #67093提供的代码。可以通过安装从该PR分支的Ansible来测试它
$ pip install git+https://github.com/sivel/ansible@acd-content-dir
发布到PyPI
此项目实现了针对标记提交自动构建和发布Python分发包到PyPI的功能,针对每推送至master的提交,发布到TestPyPI。所有繁重的工作都由GitHub Actions CI/CD工作流程、pep517 CLI工具和setuptools-scm的组合来完成。
然后可以通过以下方式安装发布的分发包:
$ pip install ansible-collections.python.dist.boo # for PyPI
和
$ pip install ansible-collections.python.dist.boo \ -i https://test.pypi.org/simple/ --pre # for TestPyPI
如果您通过示例学习,请查看以下文件:
pyproject.toml
setup.cfg
.github/workflows/publish-to-test-pypi.yml
此外,您可以遵循PyPA关于通过GitHub Actions发布软件包的指南,该指南将引导您完成整个过程。
先决条件
Python 3.7+
许可证
此项目中的源代码和文档在GPL v3许可下发布。
项目详细信息
关闭
哈希 for ansible-collections.python.dist.boo-0.1.2.tar.gz
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 07ed37ce773b1fd6cec1a600f96b009e989d90b972a21084fc3131d4217e408d |
|
MD5 | f6c6a1c47c12ead8b536b5907603cc28 |
|
BLAKE2b-256 | bc859a9b3a2ae86f0e6a7b568a95e7d6d43fd1586104d4d05fdd571cf1fb17f8 |
关闭
哈希 for ansible-collections.python.dist.boo-0.1.2-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6f46cbcc0ab166991f69ce95a662b33f306212c2c7f3c320c60861059b4083e0 |
|
MD5 | 1f2b445d1c7ceacf10bf18cb7ff42323 |
|
BLAKE2b-256 | 6ea318f63aae170c6566f76067c2fc3350388f2105007eeadbad0ee68de6b400 |