角色不对等的质量保证
ansiqa的Python项目详细描述
用于管理可承担角色的实用程序。设计为在roles目录中运行。
灵感来自[Ansigenome](https://github.com/nickjj/ansigenome/)
主机取决于
依赖于需要在graphviz上安装的功能。
功能
###统计信息
ansiqa stats
打印有关角色的统计信息。如果没有参数,stats将为每个参数打印以下内容:
- 任务数
- 变量集的数目
- 默认设置数
- 如果存在自述文件.*文件
- 如果meta/main.yml存在
- 如果存在extras/main.yml(ansiqa用于生成自述文件)
###元
ansiqa meta
根据ansiqa配置文件中的值生成角色的基本元文件。
###额外的
ansiqa extra
根据ansiqa配置文件中存储在extra/main.yml中的值生成角色的基本附加文件。ansiqa使用这些值生成readme。
###文档
ansiqa文档
通过填充jinja2模板生成自述文件。自述模板必须以.j2结尾,并且可以放在以下位置:
- 在ansiqa配置文件中由根级别标记模板指定
- 在当前工作目录中找到,与readme.*.j2 glob匹配
- 在用户的主目录中找到,与readme.*.j2 glob匹配
此模板将被馈送一个角色字典,其中包含以下标记
` 'name': the role name 'path': the role absolute path 'defaults': the defaults provided by the role, formatted as yaml 'files': a list of files by the role 'handlers': a list of handlers provided by the role 'meta': a dict containing the values in meta/main.yml 'tasks': a list of tasks provided by the role 'templates': a list of templates provided by the role 'tests': a boolean value, if the tests directory exists 'vars': the variables provided by the role, formatted as yaml 'extra': a dict containing the values in extra/main.yml `
###取决于
ansiqa取决于
依赖性内省。如果没有参数,dependents将打印每个角色具有的依赖项数量、每个角色依赖的次数以及每个角色的“依赖深度”(最长依赖链的长度)。
使用–graph标志,ansiqa生成一个graphviz图来可视化依赖关系树。
配置
配置文件应该是一个名为.ansiqa的yaml文件,位于当前工作目录或用户的主目录中。它可以具有以下根级别标记
` meta: A dict containing the default values for the meta/main.yml extra: A dict containing the default values for the extra/main.yml template: A string containing the path to the README template, first checking the current working directory for the path, then the home directory, and finally checking it as an absolute path. `