Commit graph

336 commits

Author SHA1 Message Date
Matt Clay
48e82b4ca8 Add test/runner to $PATH in hacking/env-setup. (#22387) 2017-03-07 16:31:53 -08:00
Brian Coca
b714f1fc4b made module notes render nicer on docsite 2017-02-24 15:15:18 -05:00
Matt Martz
5942de603d Legacy pep8 clean fixes for contrib and hacking (#21081) 2017-02-07 09:49:55 -06:00
Allan
ba39d1158c Update test-module (#20737)
* Update test-module

Ensuring invoke is assigned

Traceback (most recent call last):
  File "ansible/hacking/test-module", line 267, in <module>
    main()
  File "ansible/hacking/test-module", line 263, in main
    runtest(modfile, argspath, modname, module_style, interpreters)
  File "ansible/hacking/test-module", line 207, in runtest
    invoke = "%s%s" % (invoke, modfile)
UnboundLocalError: local variable 'invoke' referenced before assignment

* Update test-module

Made the change to only require a single if, making the function more 'DRY'.
2017-01-31 20:05:53 -08:00
Matt Clay
10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
2017-01-29 07:28:53 +00:00
Matt Clay
d0d1158c5e PEP 8 cleanup. (#20789)
* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
2017-01-28 00:12:11 -08:00
Matt Clay
95789f3949 PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup.
* PEP 8 W293 whitespace cleanup.
* Fix whitespace issue from recent PR.
2017-01-27 15:45:23 -08:00
Matt Clay
63b1e0c277 Fix infrequent PEP 8 issues. 2017-01-27 14:06:21 -08:00
Brian Coca
bcdfdc0cc3 minor cleanups
removed redundant print/exits
removed unused import and var
2017-01-19 19:37:36 -05:00
Adam Johnson
fbfe66967d Doc module meta grammar fixes (#20446)
* Remove unnecessary 'the'
* End sentences with a period
2017-01-19 12:01:55 -08:00
Will Thames
082082857d Use the python used with test-module to run modules (#19591)
* Use ansible_python_interpreter to run modules

Use ansible_python_interpreter to run modules if
`-I ansible_python_interpreter` is set.

Remove unused default from `-I` help text.

* Update test-module to pep8 standards
2017-01-17 17:25:56 -08:00
Matt Clay
cd3fdca540 Switch tests to pytest and ansible-test.
- Replace nose usage with pytest.
- Remove legacy Shippable integration.sh.
- Update Makefile to use pytest and ansible-test.
- Convert most yield unit tests to pytest parametrize.
2017-01-11 12:34:59 -08:00
Brian Coca
3c4afd0470 Doc module meta (#20093)
* updated module docs to reflect unification/meta

* new doc page

* also remove module refs to old core/extra

* Update modules_support.rst

Light edit.
2017-01-10 12:58:22 -08:00
Brian Coca
d138132bc2 show status/support in toc 2017-01-10 12:26:46 -05:00
Toshio Kuratomi
08d6990e67 Fix code-blocks to use correct syntax highlighting 2017-01-08 09:18:45 -08:00
Brian Coca
f5c1aefca9 added symbol conversion to deprecated
fixes #19697
2017-01-05 17:38:30 -05:00
Toshio Kuratomi
d001d250f0 Whitelist the hacking/cherrypick script's use of python3 2017-01-05 10:20:58 -08:00
Toshio Kuratomi
8f6009de0f Add initial script to aid in cherrypicking from devel to stable-2.2 2017-01-05 10:01:22 -08:00
Lujeni
021756a691 Update the module path from the hacking documentation (#19683)
- New path since the modules merge
2016-12-26 18:24:01 +00:00
Brian Coca
0f4ca877ac many doc fixes
removed a bunch of warnings
made nicer formatting of new module info
2016-12-22 12:27:18 -05:00
Sam Doran
73fc4e42f1 Correct type-o on support statement 2016-12-15 11:32:55 -05:00
Matt Clay
bea8a3201d Remove obsolete files and instructions. (#19079)
* Remove obsolete `unify_repos.sh` script.
* Remove submodule update after checkout reference.
2016-12-09 12:42:29 -05:00
Matt Clay
c709b22e5c Fix differences with devel. 2016-12-08 11:35:21 -05:00
Matt Davis
0b47c908eb quick and dirty module doc updates (#18944)
clean up core/extras, plumb in basic metadata display
2016-12-08 11:35:20 -05:00
Matt Davis
cb1888125d add metadata to doc support (#18802)
fix broken module docs
change doc AST id extraction to use == instead of in
2016-12-08 11:35:20 -05:00
Matt Clay
75c281debc Fix compile errors in scripts. 2016-12-08 11:35:20 -05:00
Toshio Kuratomi
ab43a26915 Additional reports (#18779)
* Additional reports
* Fix default status to be a list
2016-12-08 11:35:19 -05:00
Adrian Likins
b5a63a556d fix docs on related to remove of core/extras 2016-12-08 11:35:19 -05:00
Toshio Kuratomi
c53b73228f Update the metadata tool (#18765)
* Latest spreadsheet version uses different fields for support.
* Format the metadata to be a little nicer (multiple lines)
2016-12-06 06:27:10 -08:00
Toshio Kuratomi
d3dd11b21c Update for latest spreadsheet fields 2016-12-05 06:44:37 -08:00
Toshio Kuratomi
39c2249e49 Update metadata for the rename of curated to committer 2016-12-05 04:27:41 -08:00
Brian Coca
bfb43ed0b1 yes, im using bashisms 2016-12-01 09:20:20 -05:00
Brian Coca
2b13ad0ae8 dont skip github modules... 2016-11-30 22:21:29 -05:00
Brian Coca
eef7b8b5a5 now also unifies plugins in same dir structure 2016-11-30 22:18:35 -05:00
Toshio Kuratomi
c22dde615d Add a tool to work with module metadata (#18488)
* Add a tool to work with module metadata

* Don't hardcode async_wrapper
2016-11-14 15:31:02 -08:00
Toshio Kuratomi
b8321c74c8 Fix indentation of multiline descriptions 2016-11-02 17:55:21 -07:00
Matt Clay
0d46805979 Clean up shebangs for various files.
- Remove shebangs from:
  - ini files
  - unit tests
  - module_utils
  - plugins
  - module_docs_fragments
  - non-executable Makefiles
- Change non-modules from '/usr/bin/python' to '/usr/bin/env python'.
- Change '/bin/env' to '/usr/bin/env'.

Also removed main functions from unit tests (since they no longer
have a shebang) and fixed a python 3 compatibility issue with
update_bundled.py so it does not need to specify a python 2 shebang.

A script was added to check for unexpected shebangs in files.
This script is run during CI on Shippable.
2016-11-02 17:00:27 -07:00
Brian Coca
c16a88cac4 keep list as list in synopsis 2016-11-01 16:00:05 -04:00
Sam Doran
cf8639ff62 Fish hacking setup fix (#18084)
* Remove old egg-info files before creating new ones

Currently, setup.py generates egg files then they are deleted. This change
fixes this behavior and matches that in env-setup.

* Do not try to move ansible*egg-info to lib/

setup.py creates the ansible.egg-info in lib/ so this step is unnecessary. Matches env-setup behavior.

* Better test for number of arguments in argv

This prevents an erronous error message from being thrown since set -q returns an error code with the number of variables not defined, resulting in a non-zero exit if no arguments are passed.

Indent case statement within switch statement.
2016-10-24 10:35:00 -07:00
Adrian Likins
cf39a1abab test-module _ansible_selinux_special_fs arg added
modules need to have _ansible_selinux_special_fs passed in
as an arg, so add the default to the args.
2016-10-23 16:34:53 -07:00
Brian Coca
72e6ffad47 added script to unify repos
in case i forget how to do this, can be deleted afterwards
2016-10-03 22:55:38 -04:00
cinerama70
db276373e5 gen_distribution_version_testcase.py should fail if ansible run fails (#17693)
Currently, "ansible localhost -m setup" can fail silently during the
run of gen_distribution_version_testcase.py, resulting in incorrect
output. Use check_output() rather than communicate() and handle
the exception if we get a nonzero return value.
2016-09-26 15:35:36 -07:00
cinerama70
02cec7dca9 Add os_family to test_distribution_version (#17620)
As suggested in feedback on
https://github.com/ansible/ansible/pull/17575, add
os_family to test_distribution_version. Add the
correct os_family to the existing testcase data
entries.

Also add os_family to the output of
gen_distribution_version_testcase.py so any new
generated entries will contain this data.
2016-09-17 23:27:35 +02:00
Toshio Kuratomi
4ed88512e4 Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423)
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing.  So once created it we had two sets of functions that did
the same things but had different implementations.  To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
2016-09-06 22:54:17 -07:00
Michael Scherer
619f3d13ef Add detection of python3 to hacking/env-setup (#17357)
People can still override the detection using PYTHON_BIN
2016-09-02 12:11:38 -07:00
scottb
235eab6609 Merge pull request #16316 from alikins/alikins_docsite_make
Fewer deps for 'make webdocs' from top level
2016-08-19 12:06:56 -07:00
Josh Smift
81d7e132f9 force deletion of .pyc files (#17109) 2016-08-17 00:43:10 +02:00
Matt Davis
525c0469d2 tweak hacking/env-setup to work under ash (#17054) 2016-08-11 16:58:08 -07:00
Toshio Kuratomi
48a2773463 Find places where ziploader is used and change them to ansiballz so that people aren't confused when they google for information.information (#16715) 2016-07-21 10:58:24 -07:00
Adrian Likins
a1c21f8400 Fewer deps for 'make webdocs' from top level
Previously it also built the MANPAGES target
requiring asciidoc and libxml, before starting
a 'make docs' in docsite.

Also change the #! line in
hacking/dump_playbook_attributes.py to not specify
python2... yet.
2016-06-28 11:01:42 -04:00