Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sivel/ansible-testing
Python module to help test or validate Ansible, specifically ansible modules
https://github.com/sivel/ansible-testing
Last synced: 3 months ago
JSON representation
Python module to help test or validate Ansible, specifically ansible modules
- Host: GitHub
- URL: https://github.com/sivel/ansible-testing
- Owner: sivel
- License: gpl-3.0
- Created: 2015-05-18T15:59:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-25T14:06:27.000Z (about 8 years ago)
- Last Synced: 2024-10-04T16:38:41.252Z (3 months ago)
- Language: Python
- Homepage:
- Size: 127 KB
- Stars: 11
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
**WARNING:** This repository is no longer active, the code has been merged into the main `Ansible `_ repository.
ansible-testing
===============Python module to help test or validate Ansible, specifically ansible
modulesInstallation
------------This module must be installed alongside the current development
release of Ansible to appropriately test the current development
state of modules.Usage
~~~~~::
pip install git+https://github.com/ansible/ansible.git@devel#egg=ansible
pip install git+https://github.com/sivel/ansible-testing.git#egg=ansible_testing
ansible-validate-modules /path/to/ansible-modules-extrasHelp
~~~~::
usage: ansible-validate-modules [-h] [-w] [--exclude EXCLUDE] modules
positional arguments:
modules Path to module or module directoryoptional arguments:
-h, --help show this help message and exit
-w, --warnings Show warnings
--exclude EXCLUDE RegEx exclusion patternCurrent Validations
-------------------Modules
~~~~~~~Errors
^^^^^^#. Interpreter line is not ``#!/usr/bin/python``
#. ``main()`` not at the bottom of the file
#. Module does not import ``ansible.module_utils.basic``
#. Missing ``DOCUMENTATION``
#. Documentation is invalid YAML
#. Invalid schema for ``DOCUMENTATION``
#. Missing ``EXAMPLES``
#. Invalid Python Syntax
#. Tabbed indentation
#. Use of ``sys.exit()`` instead of ``exit_json`` or ``fail_json``
#. Missing GPLv3 license header in module
#. Powershell module missing ``WANT_JSON``
#. Powershell module missing ``POWERSHELL_COMMON``
#. New modules have the correct ``version_added``
#. New arguments have the correct ``version_added``
#. Modules should not import requests, instead use ``ansible.module_utils.urls``
#. Missing ``RETURN`` for new modulesWarnings
^^^^^^^^#. Try/Except ``HAS_`` expression missing
#. Missing ``RETURN`` for existing modules
#. ``import json`` found
#. Module contains duplicate globals from basic.pyModule Directories (Python Packages)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#. Missing ``__init__.py``