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
Matt Martz
4547ac7fb1
v2 version of slack callback plugin
2016-01-28 16:13:29 -06: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
Alexey Shabalin
9be8ecda06
Add support ssh configs from /etc/openssh.
...
In Altlinux system config dir for openssh is /etc/openssh.
2016-01-14 13:01:49 +03: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
Tom Paine
76ac6294e0
profile_tasks README.md
...
As agreed with Brian Coca in Ansible Project group:
https://groups.google.com/forum/#!searchin/ansible-project/tom$20paine/ansible-project/__nv6BZs2yU/AkYQ0HU-BQAJ
2016-01-11 18:21:28 +00:00
Matt Martz
45d9cfcc6f
Coalesce forms of ssh_args in order of most specific to least
2016-01-11 11:55:25 -06: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
Charles Paul
b4ed3a4f52
properly handle addresses on /31 networks
2016-01-06 10:57:52 -06: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
Brian Coca
f3c45adfb8
simplified diff handling in callback
...
no need for the copy or other complexity
2016-01-05 14:26:38 -05:00
Brian Coca
9972c27a9b
now handles 'non file diffs'
...
this allows modules to pass back a 'diff' dict and it will still show using the file interface
2016-01-05 14:26:38 -05:00
Toshio Kuratomi
c0a8cd950b
Fix problems with non-ascii values passed as part of the command to connection plugins
...
@drybjed discovered this with non-ascii environment variables and
command line arguments to script and raw module.
2016-01-04 20:35:25 -08:00
Toshio Kuratomi
8d57ffd16b
Revert "Transform the command we pass to subprocess into a byte string in _low_level-exec_command"
...
This reverts commit 0c013f592a
.
Going to do this in the connection plugin
2016-01-04 19:25:40 -08:00
Toshio Kuratomi
559ba467c0
Revert "Convert to bytes later so that make_become_command can jsut operate on text type."
...
This reverts commit c4da5840b5
.
Going to do this in the connection plugins
2016-01-04 19:25:40 -08:00