Commit Graph

50 Commits (38fd67bead2655363fcfcc9756987ac51c9d3ad8)

Author SHA1 Message Date
James S. Martin 978716cf4c Shows messages for uncaught exceptions from called modules in async_wrapper output. (#4591) 8 years ago
Brian Coca 5d90b86d82 added docs for vars_from/defaults_from 8 years ago
Brian Coca c5e13ca0ed updated include_role docs to latest info 8 years ago
Brian Coca 6eab2b3d40 1st draft of include role docs 8 years ago
Brian Coca d64060ace0 updated docs to reflect new feature 8 years ago
Brian Coca 4c59da1cf4 documenting behaviour as clear as possible 8 years ago
James Cammarata 799159b8ee Removing erroneous import from async_status 8 years ago
James Cammarata b75f305079 Ensure async wrapper and status return consistent fields 8 years ago
James Cammarata 28567b6ea0 Merge pull request #4051 from Shrews/async_atomic_move
Use os.rename() in async_wrapper
8 years ago
Brian Coca 2373810034 updated set_fact docs with note about typing 8 years ago
David Shrewsbury 4e239f6ce0 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.
9 years ago
Brian Coca 77b4a0367c updated docs in pause to reflect 0 value behaviour 9 years ago
Stanislav Antic f0f5272f90 Fix wait_for on python < 2.6 (#3790) (#3973) 9 years ago
Brian Coca a1e6311197 reverted need for module utils imports 9 years ago
Brian Coca ab4ec24813 added missing import
readded raise
9 years ago
Brian Coca 4a0c483e09 exception ans sys.exit fixes 9 years ago
Toshio Kuratomi f9b28aaae3 Fix exception handling in async_wrapper 9 years ago
Brano Zarnovican 3456c24b96 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
9 years ago
codemeup @ Work 1e0bb94ced 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).
9 years ago
Michael Scherer 3a20fc4d0c Fix wait_for to compile on python3 (#3722) 9 years ago
Michael Scherer 0e75317904 Do not use a tuple as argument for _create_connection (#3655) 9 years ago
vaupelt 67de0675c3 exclude_hosts does not work as expected with state=drained
There are established connections for a service. The service is bound to a ipv4-mapped ipv6 address. Wait_for wrongly waits for clients listed in exclude_hosts.
9 years ago
Toshio Kuratomi 6e5b09f3a8 Allow async to not need an args file since new-style modules have args embedded 9 years ago
Matt Davis 4f5d02f08f Merge pull request #2463 from nitzmahone/async_status_error_masking
mark failed async_status as finished
9 years ago
Toshio Kuratomi caf4b759b9 Specify types in argument_spec instead of code so that checking type vs default value does not trigger 9 years ago
Brian Coca 649689bfb6 documented new verbosity option 9 years ago
Brian Coca 21f6390fa3 clarified set_fact function 9 years ago
nitzmahone 077f8131aa mark failed async_status as finished
Running async_status in an "until: result.finished" loop will mask a module failure (eg, traceback) with a
template failure, because the fail dict doesn't include "finished" (eg, you'll see "ERROR! The conditional check 'bogus_out.finished' failed. The error was: ERROR! error while evaluating conditional: bogus_out.finished ({% if bogus_out.finished %} True {% else %} False {% endif %}"). Because the failure dict still includes "failed: true",
this change has no effect on stoppage/failure reporting, it just prevents the common usage pattern from masking the underlying error message.
9 years ago
Lars Larsson fa2ea225dd total_seconds not present on timedelta on python2.6 9 years ago
Brian Coca d192e2c3e3 code cleanup and reoorg, renamed vars and functions to actual purpose
reneabled logging of steps
9 years ago
Toshio Kuratomi 0fa4c5fc2b Merge pull request #2285 from evanccnyc/devel
add documentation for include_vars and JSON
9 years ago
Toshio Kuratomi 43cecd3cee Use select in wait_for so that we don't get stuck in cornercases:
* reading from a socket that gave some data we weren't looking for and
  then closed.
* read from a socket that stays open and never sends data.
* reading from a socket that sends data but not the data we're looking
  for.

Fixes #2051
9 years ago
Evan Carter 7b9c326ca6 add documentation stating that JSON files can be loaded with include_vars 9 years ago
Brian Coca 697307f88c Merge pull request #1670 from mikeputnam/issue-1643-gpl-header
Add missing GPLv3 License header
9 years ago
Brian Coca 008caa1ff7 Merge pull request #591 from d3rp/wait_for
Fix 'wait_for' doesn't work with ipv6only host
9 years ago
Mike Putnam 6c0e264806 Add missing GPLv3 License header
Fixes #1643
10 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 10 years ago
Brian Coca 7810a898e8 sleep when only doing a time delay to avoid cpu churn 10 years ago
Nathaniel 5aae7f3e51 Update set_fact.py
Context: I recently discovered that when setting a fact, key=value pairs and complex arguments differ in how the fact is stored. For example, when attempting to use complex arguments using key=values, the result can be stored as a unicode string as opposed to an object/list/etc.

I'm hoping the above example update will better demonstrate to and instruct people to use complex arguments instead of key=value pairs in certain situations.
10 years ago
Brian Coca 1d6d3fece7 added docs to show wait_for default timeout settings
Fixes #400
10 years ago
Brian Coca cbc1655ba0 Merge pull request #784 from bcoca/wait_for_docs
added missing docs on connection_timeout for wait_for
10 years ago
Gerard Lynch 9967aa6681 wait_for: updated docs, must be resolvable hostname, updated example 10 years ago
Brian Coca 3100236628 added missing docs on connection_timeout for wait_for 10 years ago
Andrey Trubachev 10e48d18f7 Fix python-2.4 compatibility 10 years ago
Andrey Trubachev 659c6d3a7e Fix 'wait_for' doesn't work with ipv6only host 10 years ago
Brian Coca 5af9928996 let implied type do the spliting 10 years ago
Brian Coca d67ac4d33e minor fixes to wait_for to avoid tracebacks as per ansible core issue #9244 10 years ago
Brian Coca c6dcd38355 added missing init.py for utilities modules 10 years ago
Michael DeHaan cec519f70e Move internal category to utilities to remove one more category from the left hand menu, keeping it concise. 10 years ago
Michael DeHaan 0be8798858 Renames. 10 years ago