Commit Graph

17558 Commits (e6c9d9c81b72f2ea399837b514f25bc35b0e20da)
 

Author SHA1 Message Date
Graham Ullrich e6c9d9c81b Update CHANGELOG.md 9 years ago
James Cammarata 0c250f2b07 Use templated handler name during callback
Fixes #14082
9 years ago
nitzmahone a516f883ac convert winrm put_file script template to Unicode string literal
Fixes traceback on homedirs with non-ascii chars
9 years ago
Brian Coca 95f7aa2b53 corrected submodule ref 9 years ago
James Cammarata da4a9d6da0 Fix bug with any_errors_fatal where task was not available 9 years ago
Alexey Shabalin d18cc79873 add detect Altlinux distributive 9 years ago
James Cammarata 2b3cd2577a Disallow setting state on template tasks
Fixes #14056
9 years ago
James Cammarata 50bb0d08f1 Template the run_once value in the linear strategy as we use it there
This is pre-post_validation, so we have to template it on the fly
as we use it to determine if we bypass the host loop.

Fixes #11876
9 years ago
James Cammarata 391420d88f Re-add cache clearing call to Inventory init
This prevents a bug where the existing cache outside of the class
is not cleared when creating a new Inventory object. This only really
affects people using the API directly right now, but wanted to fix it
to prevent weird errors from popping up.
9 years ago
James Cammarata 4627b3efbb Standardize removal of BECOME-SUCCESS method and use it for async too
Fixes #13965
Fixes #13971
9 years ago
Selivanov Pavel 7d8794daa6 plugins/strategy: added significant details to parser error message.
See discussion at
https://github.com/ansible/ansible/issues/13753
9 years ago
James Cammarata 2021362386 Fix incorrect handling of any_errors_fatal in the linear strategy
Instead of bombing out of the strategy, we now properly mark hosts failed
so that the play iterator can handle block rescue/always properly.

Fixes #14024
9 years ago
James Cammarata bb564075b5 Forward conditionals onto included plays when conditional eval errors
When using a playbook-level include, we now catch any errors raised during
the conditional evaluation step and set a flag to indicate we need to pass
those conditionals on to the included play (most likely because they contain
inventory variables for evaluation).

Fixes #14003
9 years ago
James Cammarata 09b26b6373 Don't assign both parent blocks and task includes to blocks
This causes problems when fetching parent attributes, as the include
was being skipped because the parent block would fetch the attribute
from the parent play first.

Fixes #13872
9 years ago
Brian Coca 8647fdc7f2 go back to defaulting wrapping commands in shell
this was taken out in an effort to default to the user's shell but creates issues as this is not known ahead of time
and its painful to set executable and shell_type for all servers, it should only be needed for those that restrict the user
to specific shells and when /bin/sh is not available. raw and command may still bypass this by explicitly passing None.
fixes #13882

still conditional
9 years ago
James Cammarata 7fe0bfd4f9 Revert "Properly look for parent become attribute"
This reverts commit 1b46a422aa.
9 years ago
James Cammarata 2b5caa23fb Properly look for parent become attribute
Corrects inheritence of the boolean value, which needs some special
consideration from other (string/int) values.

Fixes #13872
9 years ago
James Cammarata 0d2a9d3f53 Relocate use of ERROR to display class, to avoid doubling up 9 years ago
James Cammarata 34e3a8e6cb Catch INI section parsing misses and raise an appropriate error
Fixes #13917
9 years ago
James Cammarata 1fc35117d3 Fix role hashing failure/traceback when params contain lists
Fixes #13857
9 years ago
James Cammarata fb81447581 Don't clear start at task flag until all hosts are advanced
Clearing the flag after the first host was advanced caused all other
hosts to not advance at all.

Fixes #13864
9 years ago
James Cammarata 2dfcb218dc Fix with loop + delegate issues
* Don't re-use the existing connection if the remote_addr field of
  the play context has changed
* When overriding variables in PlayContext (from task/variables),
  don't set the same attribute based on a different variable name
  if we had already previously set it from another variable name

Fixes #13880
9 years ago
James Cammarata 44ab6db535 Fix any_errors_fatal incorrect implementation in 2.0
Also adds that flag to blocks.

Fixes #13744
9 years ago
Toshio Kuratomi d9f03cf014 Update submodule refs to pull in doc fixes 9 years ago
Tobias Wolf c5e46efbd9 Avoid recursively checking JSON inventory for Unicode
by moving to en-bloc unicode conversion to act on scripts stdout

Both python-json and simplejson always return unicode strings when using
their loads() method on unicode strings. This is true at least since
2009. This makes checking each substring unnecessary, because we do not
need to recursively check the strings contained in the inventory dict
later one-by-one

This commit makes parsing of large dynamic inventory at least 2 seconds
faster.

cf: https://github.com/towolf/ansible-large-inventory-testcase
9 years ago
Brian Coca 92579eb48f avoid shredding empty files, also x/0
also cleaned up unused import and exception var
9 years ago
Brian Coca d56e2fb80e corrected host/group match in inventory_hostnames
now the lookup works when using ! and & operators
fixes #13997
9 years ago
Toshio Kuratomi 1f930f098f Update core submodule to bring in yum fix 9 years ago
Toshio Kuratomi 63404821da rework run_command's env setting to not change os.environ for the rest of the module.
New param to run_command to modify the environment for just this invocation.
Documentation and comment adjustments.
9 years ago
Brian Coca cf75521bc8 updated submodule refs 9 years ago
Brian Coca 50d34f90e7 clarified with_file 9 years ago
Toshio Kuratomi 089f17bfc8 Don't tracback trying to retore settings
Can occur if we exit the timeout before the settings were changed
9 years ago
Toshio Kuratomi 27bf701260 Set decoding of path to unicode to raise an exception if non-utf8
Letting it pass would just cause an error later on (no such file found)
so it's better to catch it here and know that we have users dealing with
non-utf8 pathnames than to have to track it down from later on.
9 years ago
Toshio Kuratomi 299e42bc28 Make all parts of messages and pathnames into unicode so that we don't get UnicodeError tracebacks.
Note that the fix for display normalizing to unicode is correct but the
fix for pathnames is probably not.  Changing pathnames to unicode type
means that we will handle utf8 pathnames fine but pathnames can be any
sequence of bytes that do not contain null.  We do not handle sequences
of bytes that are not valid utf8 here.  To do that we need to revamp the
handling of basedir and paths to transform to bytes instead of unicode.
Didn't want to do that in 2.0.x as it will potentially introduce other
bugs as we find all the places that we combine basedir with other path
elements.  Since no one has raised that as an issue thus far so it's not
something we need to handle yet.  But it's something to keep in mind for
the future.

To test utf8 handling, create a utf8 directory and run a playbook from
within there.

To test non-utf8 handling (currently doesn't work as stated above), create
a directory with non-utf8 chars an run a playbook from there.  In bash,
create that directory like this: mkdir $'\377'

Fixes #13937
9 years ago
Brian Coca 2f40903397 clarify role include paths 9 years ago
Brian Coca 2ec31c2c79 fixed exception handling to be 2.4 compatible
previous 'fix' broke on 2.4
9 years ago
Brian Coca 7afd8e9640 added missed ec2_vpc_net_facts 9 years ago
Brian Coca 93781e0b05 be consistent about conversion to_str 9 years ago
Brian Coca edff4a9219 updated submodule refs 9 years ago
Toshio Kuratomi 69b8a48ed1 Turn results that come from traceback messages into unicode, not str.
Fixes #13964
Fixes #13967
9 years ago
Toshio Kuratomi 8f45660398 Update submodule refs 9 years ago
Toshio Kuratomi c8ffe94bf4 Fix proposed by @Yannig to fix become success detection when the output is multiline
See the Bug report for a specific error case with local connection,
sudo, and the raw module

Fixes #13728
9 years ago
Brian Coca c06b2e4622 correctly deals with non serializable type
combine_vars shoudl really be data types, but some just get in
in test, add dict to mock and avoid combine_vars using object
9 years ago
James Cammarata 1394cdf6b9 Fix set_fact + run_once to assign variables to all hosts in the list
Fixes #13921
9 years ago
James Cammarata 38a272b004 Allow module args as k=v pairs when using the module: option with local_action
This task format is valid in 1.x, but was broken in 2.x:
  - local_action:
     module: shell echo "hello world"
9 years ago
James Cammarata 97a5804a2c Minor cleanup when reassigning play context to reused connections
* Relocate the assignment of the host address to the remote_addr field
  in the play context, which was only done when the connection was created
  (it's now done after the post_validate() is called on the play context)
* Make the assignment of the play context to the connection an else, since
  it's not required if the connection is not reused
9 years ago
Karthik T 8436a88b5d Fixes #13763 Update connections _play_context on every iteration
If this isnt updated, the _connection is reused, and thus has an outdated _play_context
This results in outdated `success_key` and `prompt` causing issues if sudo is run in a loop
Refer to the issue #13763 for more debugging and details
9 years ago
Toshio Kuratomi 0bf20fab84 Fix erroneous fetch fail when fail_on_missing is set to False
Fixes #13832
9 years ago
Denis 22272fe5b8 Fix typos. 9 years ago
Brian Coca 7d8afbd83d fix issue with add_hosts overwriting existing vars
fixes github.com/ansible/ansible-modules-core/issues/2799 and is alternative to #13841
9 years ago