Commit Graph

17785 Commits (068e322610397dfb35e40fb5201c33f53164019c)
 

Author SHA1 Message Date
Tobias Wolf 0fddd90f14 Handle the key 'prepared' in the 'diff' result from modules
So far, when a 'diff' dict is returned with module results, it is
checked for 'before' and 'after' texts, which are processed in
_get_diff() by python difflib.  This generates the changes to display
when CLI users specify --diff.

However, some modules will generate changes that cannot easily be
expressed in a conventional diff. One example is the output of the
synchronize module, which presents changed files in a common log format
as in `rsync --itemize-changes`.

Add a check for a diff['prepared'] key, which can contain prepared diff text
from modules.
9 years ago
James Cammarata 5fe16bef6f Make sure blocks use their parents dependency chains
Fixes a bug inroduced in fb797a9 where included tasks in a role
were not being executed because the child blocks had no dep chain
set.
9 years ago
James Cammarata 86b179d3d7 Allow certain base attributes to be used as role params
Role definitions typically require params to be different from those
which are specified as FieldAttributes on the playbook classes used
for roles, however a certain subset should be allowed (typically those
used for connection stuff).

Fixes #14095
9 years ago
James Cammarata 7a8520ac1a Fixing role dependency chain creation
The dep chain for roles created during the compile step had bugs, in
which the dep chain was overwriten and the original tasks in the role
were not assigned a dep chain. This lead to problems in determining
whether roles had already run when in a "diamond" structure, and in
some cases roles were not correctly getting variables from parents.

Fixes #14046
9 years ago
Toshio Kuratomi 8f7868aead Note bugfix for unicode characters and the pager 9 years ago
Toshio Kuratomi 9ddb4a985c Changes to convert to unicode at the borders
The module docs and vault changes solve issues where tracebacks can
happen.  The galaxy changes are mostly refactoring to be more pythonic
with a small chance that a unicode traceback could have occurred there
without the changes.  The change in __init__.py when we actually call
the pager makes things more robust but could hide places where we had
bytes coming in already so I didn't want to change that without auditing
where the text was coming from.

Fixes #14178
9 years ago
Toshio Kuratomi 55db4d9e23 Add squashing fix to the changelog 9 years ago
Toshio Kuratomi 849def8d6e Squashing was occuring even though pkgs didn't have a template that would be affected by squash
This broke other uses of looping (looping for delegate_to in the
reported bug)

Fixes #13980
9 years ago
Toshio Kuratomi c0d6a0c11a Update submodule refs 9 years ago
Brian Coca 97cd0bc803 fixed unit test to match new output of become/su 9 years ago
Brian Coca 7c7e849a27 fixed issue with vars prompt warning causing error
sometimes display object is not magically available, use it explicitly,
no need to be classmethod anymore
fixes #14147
9 years ago
Brian Coca 9eaa5fecc1 fix for so su works in more cases
should not fail anymore on csh, fish nor the BSDs
fixes #14116
9 years ago
Toshio Kuratomi a0b7620b8e Add fix for 2831 to the changelog 9 years ago
Toshio Kuratomi 3906614538 Fix for inventory hosts on localhost with alternate ports.
Fixes https://github.com/ansible/ansible-modules-core/issues/2831
9 years ago
Brian Coca 03a89e17b9 fixed permissions check for ansible.log
fixes #13990
9 years ago
Sergii Korochkin c52a35ff34 [hotfix] add missed playbook file 9 years ago
Sergii Korochkin 16ee2090bd Adding support for scm-based role source urls (incl. integration test to cover it) 9 years ago
Toshio Kuratomi 7e1a3da97c Add last few major fixes to the 2.0.1 changelog 9 years ago
Toshio Kuratomi 625e8f2030 Update submodule refs 9 years ago
Toshio Kuratomi 826f42a153 For synchronize, fix sudo to execute on the remote end of the connection
* In 2.0.0.x become was reversed for synchronize. It was happening on
  the local machine instead of the remote machine. This restores the
  ansible-1.9.x behaviour of doing become on the remote machine.
  However, there's aspects of this that are hacky (no hackier than
  ansible-1.9 but not using 2.0 features).  The big problem is that it
  does not understand any become method except sudo.  I'm willing to use
  a partial fix now because we don't want people to get used to the
  reversed semantics in their playbooks.
* synchronize copying to the wrong host when inventory_hostname is
  localhost
* Fix problem with unicode arguments (first seen as a bug on synchronize)

Fixes #14041
Fixes #13825
9 years ago
Toshio Kuratomi 1fdf8bca2a python3 doesn't have raw explicit-unicode literals. Workaround it with a raw native string that we make unicode in py2. 9 years ago
Toshio Kuratomi 6eaf9b9fa2 Transform tracebacks into unicode before printing
Fixes #14042
9 years ago
Brian Coca 9a3515357b raise AnsibleError as an 'expected' exception
fixes #14065
9 years ago
Brian Coca cd0812a187 adhoc now respects limit when listing hosts
also removed cruft about localhost as if used it is specified inline
fixes #13848
9 years ago
Brian Coca 864c67cec5 ensure stdout callback alwasy is loaded first
it is now called for every event prior to any other callbacks
fixes #14114
9 years ago
Brian Coca 7fe91e1848 better error when host inventory script isnt dict 9 years ago
Brian Coca 084bacc4a4 add webdocs as alias 9 years ago
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