Commit Graph

93 Commits (9b48f8b50deb1669de84dface9946bc73ad3faa6)

Author SHA1 Message Date
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati 17c80f6bbb Call main in conditional way - utilities (#5827) 2016-12-08 11:25:35 -05:00
Matt Clay 86d53db3e4 Update async_wrapper.py to remove own temp dir. (#5719) 2016-12-08 11:25:33 -05:00
Matt Clay 82e74668a6 Support script interpreters in async_wrapper. (#5703) 2016-12-08 11:25:33 -05:00
Sam Doran c0c26f83a8 Examples syntax batch7 (#5624)
* Change example syntax on nxos_feature module

* Change example syntax on nxos_hsrp module

* Change example syntax on nxos_igmp module

* Change example syntax on nxos_interface module

* Change example syntax on nxos_interface_ospf module

* Change example syntax on nxos_ip_interface module

* Change example syntax on nxos_ping module

* Change example syntax on nxos_switchport module

* Change example syntax on nxos_vlan module

* Change example syntax on nxos_vrf module

* Change example syntax on nxos_vrf_interface module

* Change example syntax on nxos_vrrp module

* Change example syntax on meta module

* Change example syntax on set_fact module

* Change example syntax on win_copy module

* Change example syntax on win_file module

* Change example syntax on win_get_url module

Remove escaping of \ characeter in Windows paths since it's no longer required for single quoted or unquoted values when using multi-line YAML syntax.

* Change example syntax on win_lineinfile module

* Change example syntax on win_msi module

* Change example syntax on win_stat module

* Remove nxos_bgp example from nxos_igmp module

* Mark examples as regexp to avoid syntax error

* Cleanup win_copy.py examples

* Cleanup win_file.py examples

* Remove quotes in win_get_url.py examples

* Cleanup quotes and languare in win_lineinfile.py

* Cleanup examples in win_group.py

* Cleanup examples in win_service.py

* Don't use : in documentation because it breaks the YAML syntax check

* Cleanup win_copy.py examples

* Cleanup win_copy.py examples

* Minor change to fix test failure

* Use single quotes
2016-12-08 11:25:33 -05:00
zaiusdr 74b32d9ec0 Fix wait_for Module to handle socket response as string in Python3
In Python3 socket module returns responses as bytes type. So it's
necessary to convert it to string for the module work correctly.
2016-12-08 11:25:32 -05:00
Sam Doran b56a9852ee Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module

* Change example syntax on cron module

* Change example syntax on group module

* Change example syntax on hostname module

* Change example syntax on seboolean module

* Change example syntax on selinux module

* Change example syntax on service module

* Change example syntax on sysctl module

* Change example syntax on systemd module

* Change example syntax on user module

* Change example syntax on debug module

* Change example syntax on fail module

* Change example syntax on include module

* Change example syntax on include_role module

* Change example syntax on include_vars module

* Change example syntax on pause module

* Change example syntax on wait_for module

* Change example syntax on apache2_module module

* > Change example syntax on django_manage module

* Change example syntax on htpasswd module
2016-12-08 11:25:31 -05:00
jctanner 06e1141106 replace type() with isinstance() (#5541)
Replace all use of type() with isintance()

Addresses https://github.com/ansible/ansible/issues/18310
2016-12-08 11:25:27 -05:00
jctanner 1ccd4ae8b0 Re-add version_added to include_vars (#5493) 2016-12-08 11:25:26 -05:00
Allen Sanabria c9960c00dc Updated documentation for PR http://github.com/ansible/ansible/pull/17207 2016-12-08 11:25:25 -05:00
Brian Coca ba6bc5382d corrected version added 2016-12-08 11:25:25 -05:00
Brian Coca 9e931f89fb added ability to control sleep between attempts
the default was 1s but it makes sense to make this configurable
2016-12-08 11:25:25 -05:00
Brian Coca 47ffb6d542 minor updates to include docs 2016-12-08 11:25:25 -05:00
Brian Coca 720574ef77 added allow_duplicates to include_role docs 2016-12-08 11:25:21 -05:00
John R Barker 25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
John R Barker 3333035ef4 Add matching quotes (#5133)
Will fix broken syntax highlighting
2016-12-08 11:25:18 -05:00
Matt Davis c07a2b49b6 add JSON junk filter to async_wrapper (#5107) 2016-12-08 11:25:17 -05:00
Brian Coca 22d29be478 1st draft of include docs 2016-12-08 11:25:15 -05:00
Timothy Appnel 6647e8c271 Fixes grammatical error in assert module example (#4972) 2016-12-08 11:25:12 -05:00
Timothy Appnel b18c22f69b Adds docs for msg param in assert modules plus some other clean up (#4926) 2016-12-08 11:25:12 -05:00
Brian Coca 21ed52bfe4 fixed incorrect example 2016-12-08 11:25:05 -05:00
Brian Coca 627da622fe removed chdir / as it breaks tasks
fixes #17466
2016-12-08 11:25:04 -05:00
Monty Taylor e27b7af1e6 Don't change to root dir in async_wrapper (#4779)
The daemonizing code here is taken from an ActiveState recipe, which
includes changing to / as a general best practice. While that is
normally true to allow for deleting the directory that the daemon
process started in, in this case it is not relevant as this is not
intended to be an actual long-running daemon.

Issue ansible/ansible#17466
2016-12-08 11:25:04 -05:00
Brian Coca 909e62b25b updated include_role docs 2016-12-08 11:25:02 -05:00
Matt Clay 1f6e3326db Python 3 fixes for async_wrapper and async_status. (#4671) 2016-12-08 11:25:00 -05:00
Matt Clay cb30558a41 Make async_wrapper ignore '_' as an argsfile. (#4678)
This provides support for passing additional positional parameters to async_wrapper.
Additional parameters will be used by the upcoming async support for Windows.
2016-12-08 11:25:00 -05:00
James Cammarata aa67bb43fe Adding 'end_play' docs to meta module 2016-12-08 11:24:57 -05:00
Michael Scherer 25fd3928b6 Make async work on python 3 (#4583)
Since dict no longer have a iteritems method, we have to
use six to support python 2 and 3.
2016-12-08 11:24:56 -05:00
James S. Martin 4d75f9b4bc Shows messages for uncaught exceptions from called modules in async_wrapper output. (#4591) 2016-12-08 11:24:55 -05:00
Brian Coca e37f57fc90 added docs for vars_from/defaults_from 2016-12-08 11:24:54 -05:00
Brian Coca 79d970d5b8 updated include_role docs to latest info 2016-12-08 11:24:54 -05:00
Brian Coca b7d2c62f2b 1st draft of include role docs 2016-12-08 11:24:53 -05:00
Brian Coca 1160c79671 added meta as 'documentation' 2016-12-08 11:24:50 -05:00
Brian Coca 7f1e6ca005 updated docs to reflect new feature 2016-12-08 11:24:45 -05:00
Brian Coca d579dab0a0 deprecated accelerate 2016-12-08 11:24:45 -05:00
Brian Coca 498dc61154 documenting behaviour as clear as possible 2016-12-08 11:24:44 -05:00
James Cammarata 2aad8bd882 Removing erroneous import from async_status 2016-12-08 11:24:42 -05:00
James Cammarata 204e83aeed Ensure async wrapper and status return consistent fields 2016-12-08 11:24:42 -05:00
Brian Coca b55fd5f67a updated set_fact docs with note about typing 2016-12-08 11:24:41 -05:00
Brian Coca c59510aaf4 updated docs in pause to reflect 0 value behaviour 2016-12-08 11:24:40 -05:00
David Shrewsbury 88122e0f72 Use os.rename() in async_wrapper
Because the async_status module will read from the same file that
the async_wrapper module is writing, it's possible that the file
may not be fully synced during a read, causing spurious failures.
Use a temp file to do an atomic operation on the file. We can't
use atomic_move() here as that doesn't work properly under async.

Also, let's not read concurrently from the same file the subprocess
is writing to. Instead, capture stdout/stderr via PIPE and write to
the file to avoid nasty races.
2016-12-08 11:24:40 -05:00
Stanislav Antic 4c92652e7b Fix wait_for on python < 2.6 (#3790) (#3973) 2016-12-08 11:24:38 -05:00
Brian Coca f595b27e47 reverted need for module utils imports 2016-12-08 11:24:38 -05:00
Brian Coca 0c82db9cda added missing import
readded raise
2016-12-08 11:24:38 -05:00
Brian Coca 51c3eda259 exception ans sys.exit fixes 2016-12-08 11:24:38 -05:00
Toshio Kuratomi 1b88df0bda Fix exception handling in async_wrapper 2016-12-08 11:24:38 -05:00
Brano Zarnovican 9fd52ac40e Py2.4: SystemExit in async_wrapper is not an error - compatibility fix
Prior to Python 2.5, SystemExit was a subclass of Exception.
In Py2.4, this is causing extra error output on valid sys.exit(0).

(Toshio) Call sys.exit from inside of the SystemExit exception handler so py2.4 and py2.5+ behaviour matches
2016-12-08 11:24:37 -05:00
@ c901b70a01 Fixing compile time errors irt (, e => as e, print(), ocat now 0o not 0) exception handling for Python 3 (#3851)
* Fixing compile time errors irt a) exception handling for Python 3 in util, also: b) problem octal usage (fixed) and c) print json_dump -> print(json_dump(xyz) ... et al

* This code was not Python 2.4 compliant. Octal codes and exception handling is now working with Py 2.4, 2.6, & 3.5.

* Fixing formating (or rather reverting an non 2.4 compatible change). Works in compile & runtime checking.

* a) revert to use print sys.stderr not fail_json; b) fixed var name in exception

* Python 3 compatible print (print >>sys.stderr will generate a TypeError - now uses sys.stderr.write instead).
2016-12-08 11:24:37 -05:00
Dag Wieers 6bcf88ef54 Adapt module to use new module._name property (#3918)
This is in line with the change from ansible/ansible#16087
2016-12-08 11:24:36 -05:00
Mike Mars eb4813f1ca a) fail_json uses kwargs, b) outside the fork, log instead of returning json on stdout. 2016-12-08 11:24:35 -05:00