Commit graph

299 commits

Author SHA1 Message Date
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
André Pinto
fa4011c6c3 Do not corrupt $MANPATH when it's not present (#16300)
Fixes #16299
2016-06-15 11:41:14 -04:00
Matt Davis
ec2cb07988 Make 'required' optional in module docs (#15906)
Updated module dev docs, doc build, ansible-doc to match
2016-05-18 16:57:36 -07:00
Brian Coca
71a707fba5 quick yaml syntax checker 2016-05-18 18:15:12 -04:00
Brian Coca
478674cc57 typo fix 2016-05-05 17:05:46 -04:00
Brian Coca
b7c874f81a enforce required 'required' in docs 2016-05-05 16:55:18 -04:00
Robin Roth
1d6608e84f Dist version fix for Red Hat and more tests (#15663)
* add tests for centos6, rhel6 and rhel7

* gen_distribution_version_testcase with python2.6

* remove unused imports

* fix redhat/vmware/... parsing

* add centos7 test case
2016-04-29 13:18:50 -07:00
Brett Inman
1f89a46b52 Make -q flag totally quiet for env-setup.fish
The first echo and setup.py steps are not quiet and result in output that is annoying if your Fish is configured to source the file.
2016-04-27 11:34:51 -07:00
Toshio Kuratomi
2762f12f7f Remove the duplicate modstyle parameter 2016-04-27 10:04:16 -07:00
Toshio Kuratomi
bdd73e31dc Have test-module clean up the local temp dir when it exits
Get test-module's debugger switch to do something useful with ziploader modules
2016-04-24 20:44:42 -07:00
Toshio Kuratomi
7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
2016-04-18 10:05:55 -07:00
Robin Roth
692bf51fde move gen_testcase to hacking/tests
* also use json instead of pprint
2016-04-15 17:14:43 +02:00
Toshio Kuratomi
669f3dc3a8 Cleanup. Since we no longer pass a lock, we no longer need to create it 2016-04-14 11:59:06 -07:00
Toshio Kuratomi
d78ba34cf0 We switched away from passing the lock via the arguments to modify_module
Need to fix test-module to not pass the lock either
2016-04-13 13:35:51 -07:00
Toshio Kuratomi
dcc5dfdf81 Controller-side module caching.
This makes our recursive, ast.parse performance measures as fast as
pre-ziploader baseline.

Since this unittest isn't testing that the returned module data is
correct we don't need to worry about os.rename not having any module
data.  Should devise a separate test for the module and caching code
2016-04-12 08:01:07 -07:00
Toshio Kuratomi
b27c424fa1 Fixes to the documentation build (#15356)
* Could only have one alias before.  Subsequent aliases overrode the
  previous ones.  Now multiple aliases work.
* Fix BLACKLISTED_MODULES.   Previously, modules were listed in the
  generated documentation despite being blacklisted
* Deprecated modules form extras were showing the (E) tag and not the
  (D) tag. Reversed that now (Probably not necessary to also show the
  E tag).
* Sort the deprecated modules alphabetically in the Category docs as
  well as the list of all modules
* Optimization: Previously rendered the modules to rst twice once in all
  group and once in individual categories.  Fixed to only render them
  once.
* Add fireball to blacklist and remove async_status (as people need to
  use that).
2016-04-11 17:11:55 -07:00
Toshio Kuratomi
a330a24ccc Python2.6 fix for test-module 2016-04-11 12:13:31 -07:00
Toshio Kuratomi
4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
2016-04-05 11:06:17 -07:00
Brian Coca
6a85da7e0c avoid private attributes
hardcode adding with_ for tasks
2016-03-10 01:00:33 -05:00
Brian Coca
e1faa78722 fixed typo 2016-02-29 17:52:55 -05:00
Brian Coca
cbc797a7ed added missing : 2016-02-26 16:27:10 -05:00
Brian Coca
a3489408a5 fixes to playbooks_directives generation
order is now predictable
now correctly substitutes loop for with_
adds local_action to action
2016-02-26 16:18:55 -05:00
Brian Coca
3e28ee0fd4 avoid printing internal loop and loop_args 2016-02-25 19:58:44 -05:00
Brian Coca
fbdcb22e36 now generate list of playbook ojbect directives
TODO: needs links/info and conditionals added
2016-02-25 16:48:37 -05:00
Brian Coca
fe09f7ee49 clarify that requirements are on host that runs it
fixes http://github.com/ansible/ansible-modules-core/issues/3061
2016-02-18 05:09:42 -08:00
Brian Coca
6414c967e4 now check for description and listify if needed
fixes #14371
2016-02-08 12:34:26 -05:00
Toshio Kuratomi
5cd3f71792 Handle utf-8 in module short desc 2016-02-02 13:00:24 -08:00
Jeremy Audet
5cac8efd73 Make "make webdocs" compatible with Python 3
The `webdocs` make target fails under Python 3. It fails due to a variety of
syntax errors, such as the use of `except Foo, e` and `print 'foo'`. Fix #13463
by making code compatible with both Python 2 and 3.
2015-12-08 12:00:53 -05:00
Patrik Lundin
9f9944e355 Replace -delete with portable -exec rm {} \;
Needed on OpenBSD which does not support -delete.
2015-12-02 11:06:09 +01:00
Alberto Gireud
52ded67db5 Update check mode argument 2015-11-08 20:55:10 -06:00
Brian Coca
4a206cdde9 force egg deletion 2015-11-02 11:58:20 -05:00
Brian Coca
5719912e7f added a skip for the test dir in module repos 2015-10-27 19:59:43 -04:00
Toshio Kuratomi
4203850d1a Break apart a looped dependency to show a warning when parsing playbooks
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
2015-10-27 12:39:42 -07:00
Toshio Kuratomi
baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
Brian Coca
3a0bf55ae3 better error catching for doc build 2015-10-13 11:14:28 -04:00
James Cammarata
a431121f9f Tweak to hacking path fix to go back to subshell use 2015-09-17 15:26:45 -04:00
EC
bcdb4e78ae Allow env-setup to use spaces in full path 2015-09-17 15:11:25 -04:00
Marius Gedminas
823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00