Dag Wieers
dee5dba82a
Handle when the lookup-plugin is used in jinja-style
...
This fixes #14190 .
2016-02-03 17:10:40 +01:00
Toshio Kuratomi
42e312d3bd
Change $() into backticks. Backticks should work for both POSIX and non-POSIX compatible shells.
...
Fixes #14176
2016-02-02 12:38:21 -08:00
Toshio Kuratomi
147dba5d97
Merge pull request #14277 from ansible/default-shell-type
...
Establish sh as the default shell plugin.
2016-02-02 12:19:00 -08:00
Toshio Kuratomi
5b1d8cfd5c
Establish sh as the default shell plugin.
...
This is a fix for one of the problems pointed out in #14176
2016-02-02 11:46:09 -08:00
Brian Coca
197bed6fd8
make executable setting connection dependant
...
winrm shoudl not use executable, rest should?
fixes #14233
2016-02-02 13:13:02 -05:00
Brian Coca
dc15eb806e
deprecate all bare variable conversions (not debug)
...
now deprecation message appears with variable name in all spots where this occurs
debug's var= option is excluded as this is only place where bare variables shold actually
be accepted.
2016-02-01 18:59:14 -05:00
Brian Coca
e0ed88e668
normalize error message on src != dir when local
...
now action plugin returns same error as module
2016-02-01 13:43:35 -05:00
Matt Martz
ddfab5faf1
Use isinstance type checks in bool filter so we can handle unsafe proxy objects. Fixes #14240
2016-02-01 12:32:59 -06:00
Toshio Kuratomi
9e3932ffca
Some attributes of callbacks aren't in v2. Port plugins to the v2 way to do that
...
Update porting guide with info on callback porting
2016-01-29 19:45:12 -08:00
Brian Coca
dd4787701f
fix unicode input for template lookup
...
fixes #14207
2016-01-29 10:42:52 -05:00
Toshio Kuratomi
2c825539ff
When setting up the local connection for the rsync we need to set the shell as well.
...
Fixes #13490
2016-01-28 16:02:57 -08:00
Toshio Kuratomi
3f3e3e3d5b
Return an error when synchronize is used with something other than an ssh connection
...
Suggested in #2832
2016-01-27 12:48:15 -08:00
Toshio Kuratomi
cb2b19ced8
Fix for inventory hosts on localhost with alternate ports.
...
Fixes https://github.com/ansible/ansible-modules-core/issues/2831
2016-01-26 13:53:42 -08:00
Tobias Wolf
5b293b56d6
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.
2016-01-26 09:29:37 +01:00
Toshio Kuratomi
a23a5d1b93
Merge pull request #13968 from ansible/synchronize-become-is-reversed
...
synchronize: First cut at not doing sudo on the control machine but on the remote machine instead.
2016-01-25 19:52:03 -08:00
Toshio Kuratomi
d0a062ffa3
python3 doesn't have raw explicit-unicode literals. Workaround it with a raw native string that we make unicode in py2.
2016-01-25 19:46:57 -08:00
Toshio Kuratomi
3cf59d30f7
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
2016-01-25 19:33:31 -08:00
Toshio Kuratomi
f4d68b8860
Transform tracebacks into unicode before printing
...
Fixes #14042
2016-01-25 19:18:59 -08:00
James Cammarata
46ede563dd
Use templated handler name during callback
...
Fixes #14082
2016-01-23 09:25:50 -05:00
James Cammarata
4651155942
Fix bug with any_errors_fatal where task was not available
2016-01-21 16:42:31 -05:00
James Cammarata
d02dee37a1
Disallow setting state on template tasks
...
Fixes #14056
2016-01-21 15:02:24 -05:00
James Cammarata
627dec716b
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
2016-01-20 20:54:12 -05:00
Brian Coca
c2ac1507ea
corrected host/group match in inventory_hostnames
...
now the lookup works when using ! and & operators
fixes #13997
2016-01-20 18:32:39 -05:00
James Cammarata
9b05a670c7
Merge pull request #14031 from selivan/devel
...
plugins/strategy: added significant details to parser error message.
2016-01-20 15:49:38 -05:00
James Cammarata
54cde0d082
Standardize removal of BECOME-SUCCESS method and use it for async too
...
Fixes #13965
Fixes #13971
2016-01-20 15:27:28 -05:00
Selivanov Pavel
3201f5d90e
plugins/strategy: added significant details to parser error message.
...
See discussion at
https://github.com/ansible/ansible/issues/13753
2016-01-20 23:12:26 +03:00
Brian Coca
cc4506b451
Merge pull request #14006 from bcoca/always_shell_again
...
go back to always wrapping commands in shell
2016-01-20 13:17:34 -05:00
James Cammarata
ac89b0de7a
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
2016-01-20 12:16:27 -05:00
Brian Coca
c09c01a1f5
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
2016-01-19 22:09:17 -05:00
Toshio Kuratomi
ca8261ed31
Don't tracback trying to retore settings
...
Can occur if we exit the timeout before the settings were changed
2016-01-19 14:09:22 -08:00
Toshio Kuratomi
5e18bc5955
Turn results that come from traceback messages into unicode, not str.
...
Fixes #13964
Fixes #13967
2016-01-18 14:43:55 -08:00
Toshio Kuratomi
ded02b4968
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
2016-01-18 13:48:37 -08:00
James Cammarata
b5058736ce
Fix set_fact + run_once to assign variables to all hosts in the list
...
Fixes #13921
2016-01-18 14:50:20 -05:00
Toshio Kuratomi
36aa89ac7e
Fix erroneous fetch fail when fail_on_missing is set to False
...
Fixes #13832
2016-01-15 16:28:17 -08:00
Brian Coca
a2a23c14ac
Merge pull request #13901 from bcoca/add_hosts_fix
...
fix issue with add_hosts overwriting existing vars
2016-01-15 14:22:26 -05:00
James Cammarata
1825b4a9c7
Fix any_errors_fatal incorrect implementation in 2.0
...
Also adds that flag to blocks.
Fixes #13744
2016-01-15 13:15:10 -05:00
Toshio Kuratomi
1b82de2354
Non-newstyle modules can't use pipelining
...
This is because we pass arguments to non-newstyle modules via an
external file. If we pipeline, then the interpreter thinks it has to
run the arguments as the script instead of what is piped in via stdin.
2016-01-14 17:21:15 -08:00
Brian Coca
c2d314dec5
fix issue with add_hosts overwriting existing vars
...
fixes github.com/ansible/ansible-modules-core/issues/2799 and is alternative to #13841
2016-01-14 17:55:44 -05:00
Brian Coca
94fa9c2a7a
test aliases to enable gramatical consistancy
...
keeps backwards compat by not removing the previouslly non grammer matching states
and introduces new ones so user can decide which one he wants
(or keep both and still be inconsistent to annoy those that care)
2016-01-14 12:29:02 -05:00
Brian Coca
c14eece0c6
md5 now uses smaller salt
...
fixes #13891
2016-01-14 10:24:34 -05:00
Brian Coca
cf9dfde15b
Merge pull request #13751 from bcoca/module_internal_options
...
pass diff and verbosity settings to modules
2016-01-12 11:49:48 -05:00
Brian Coca
c91df36ebe
added module name to missing interpreter error
...
fixes #13816
2016-01-12 11:25:11 -05:00
Matt Martz
5f0a348447
Restore ability for a module to specify WANT_JSON
2016-01-08 11:37:28 -06:00
nitzmahone
45355cd566
convert winrm put_file script template to Unicode string literal
...
Fixes traceback on homedirs with non-ascii chars
2016-01-07 16:23:55 -08:00
Brian Coca
b7dcd7a3a0
pass diff and verbosity settings to modules
...
also simplifies and guarantees that all flags are always passed, even when false
this should make checks simpler as you always expect them to exist
2016-01-07 01:37:19 -05:00
Toshio Kuratomi
46903c80fa
More fixes for unicode handling in the connection plugins.
...
Tested that ssh, docker, local, lxc-libvirt, chroot all work with the
updated unicode integration test.
2016-01-06 15:19:40 -08:00
James Cammarata
90cb7e1937
Don't drop noops from task counting code in linear strategy
2016-01-06 14:02:33 -05:00
Tomasz Kontusz
9ac9c75d76
linear strategy: don't look at tasks from the next block
2016-01-06 14:02:33 -05:00
James Cammarata
dc47c25e58
Minor tweak to ensure diff is not empty in callback for file diffs
2016-01-05 22:01:01 -05:00
Brian Coca
095790ac5c
Merge pull request #13691 from bcoca/colors
...
output color is now configurable
2016-01-05 14:33:01 -05:00