Commit graph

541 commits

Author SHA1 Message Date
Toshio Kuratomi
baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
Toshio Kuratomi
5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
2015-10-14 18:57:10 -07:00
James Cammarata
d923d05a33 Reworking the way all() works in plugin_loader
* Don't throw away the full path of the module code being loaded,
  as this can cause conflicts when files of the same name are being
  instantiated
* Generalize the module loading code

Fixes #12738
2015-10-14 17:53:28 -04:00
James Cammarata
45b803efb4 Properly use test_loader from SharedPluginLoaderObj 2015-10-14 17:53:28 -04:00
Brian Coca
f5227d494b added missing cachefile and changed str(e) to to_bytes(e) 2015-10-13 11:15:10 -04:00
James Cammarata
426187489f Add variable for format parameter 2015-10-13 02:33:18 -04:00
Toshio Kuratomi
8277747a04 Fix password lookup when password file exists and the password is not encrypted 2015-10-12 15:52:03 -07:00
Toshio Kuratomi
b49e0995cb Fix typo 2015-10-12 13:29:04 -07:00
Toshio Kuratomi
b58d7470d4 Cleanup logic and be more paranoid about passwords with spaces 2015-10-12 12:55:33 -07:00
James Cammarata
5c5806d669 Fixing bugs related to jfonfile cache plugin
* corrupt/invalid file causes tracebacks
* incorrect initialization of display/_display in BaseCacheModule class
* tweaking the way errors in get() on jsonfile caches work, to raise
  a proper AnsibleError in that situation so the playbook/task is stopped

Fixes #12708
2015-10-12 13:06:41 -04:00
Brian Coca
f5f3bf06e4 Merge pull request #12550 from redrampage/remove-pw-salt-deletion
Removed deletion of salt by 'password' lookup
2015-10-12 11:33:19 -04:00
Toshio Kuratomi
45a161b0a1 Merge pull request #12429 from edmstudio/devel
Update synchronize module plugin to work on OS X
2015-10-09 16:05:46 -07:00
Petr Mifek
6e035a3e94 Move nested function test for ipv6 to top level in synchronize module. 2015-10-10 00:01:22 +02:00
Brian Coca
45788fbfad <homer>doh!</homer> 2015-10-09 16:58:01 -04:00
Brian Coca
b9d54e9a01 corrects previous fix to deal with missing item key in results dict 2015-10-09 13:01:32 -04:00
Brian Coca
bcb173996b Merge pull request #12695 from matburt/fix_cache_plugins_for_v2
Fix an issue where cache plugins weren't updated in certain scenarios
2015-10-09 11:39:58 -04:00
Brian Coca
fbf4cafab5 on skipped you 'might' not have an item, changed to getattr to avoid keyerror
fixes #12683
2015-10-09 11:28:11 -04:00
Matthew Jones
7da478a4f4 Fix an issue where cache plugins weren't updated
The first call to persisting facts would work due to the assignment of a
MutableMapping calling __setitem__ but subsequent module fact data would
not be propogated to the fact cache plugins because update() doesn't
invoke __setitem__.  This changes the behavior a little bit and ensures
set() is called on cache plugins.
2015-10-09 11:16:41 -04:00
Brian Coca
ec02b255c3 Merge pull request #12689 from soarpenguin/bugfix
Remove some warning of undefined name and fix classmethod syntax error.
2015-10-09 11:09:50 -04:00
James Cammarata
770032648a Show -> localhost for local_action tasks 2015-10-09 10:53:53 -04:00
James Cammarata
868819f9fa Make sure shlex split is returning properly encoded strings
Fixes #12676
2015-10-09 09:49:27 -04:00
soarpenguin
5efa4d29e3 fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
James Cammarata
59d655c543 Double echo temp directory name to handle spaces and ~ expansion both
Fixes #12667
2015-10-08 16:22:38 -04:00
Brian Coca
dac3684fd1 changed task color to dark gray to keep it from being confused with ignore/skip 2015-10-07 12:12:35 -04:00
Juraci
e52950a939 Displaying task_path on task start when verbosity is more than 3 2015-10-07 10:11:50 -03:00
James Cammarata
9e364c2eb5 Don't modify results in callbacks
Fixes #12654
2015-10-06 21:43:43 -04:00
Toshio Kuratomi
97e8d25eb4 Fix for encoding errors when a command returns non-utf8 encoded values 2015-10-06 14:10:25 -07:00
Toshio Kuratomi
10a4a4e986 Quote any file paths that we have to use with dd to copy.
This is because we pass the whole dd command string into the shell
that's running on the contained environment rather than running it
directly from python via subprocess without a shell.
2015-10-03 18:07:27 -07:00
Toshio Kuratomi
b83988d9fb Port libvirt_lxc connection plugin to v2 2015-10-03 17:42:49 -07:00
Toshio Kuratomi
567deb5ac2 Add explicit substitution of relative paths on the remote host just in case the connection programs do something unexpected. 2015-10-03 17:33:57 -07:00
James Cammarata
38528c8ef3 Show more info in the minimal callback for unreachable hosts
Fixes #12621
2015-10-03 01:41:57 -04:00
Toshio Kuratomi
613e87db6c FIx typo arg_path (not plural) 2015-10-02 19:55:32 -07:00
Brian Coca
4ba5ebd1c8 Merge pull request #12538 from yesbox/url_lookup_plugin_httperror_fix
Fix url lookup plugin HTTPError message not being reachable
2015-10-02 21:30:16 -04:00
Toshio Kuratomi
10750214ea Since Connection.execute_command() returns bytes, deal with the repurcussions here. 2015-10-02 12:39:36 -07:00
Brian Coca
e2ae3215f6 corrected no_log for items and skipped tasks
corrected output from default callback
added new tests for no_log loops
updated makefile test to check for both positive and negative occurrences of no_log
2015-10-02 14:35:33 -04:00
James Cammarata
c28758d2a8 Merge branch 'ssh-args' of https://github.com/amenonsen/ansible into amenonsen-ssh-args 2015-10-02 13:38:00 -04:00
James Cammarata
82faba619e Also add args_path param to powershell shell plugin 2015-10-02 13:25:26 -04:00
James Cammarata
30d481ac57 Fix old-style (non-python) module support 2015-10-02 12:58:35 -04:00
Abhijit Menon-Sen
b127221f50 Pass default None to getattr, remove repeated call 2015-10-02 21:26:25 +05:30
Abhijit Menon-Sen
96c4dc273a Set explicit default for ANSIBLE_SSH_ARGS
The earlier code behaved exactly as though this default had been set,
but it was actually handled as a(n unnecessary) special case inside the
connection plugin, rather than set as an explicit default.

If the default is overriden either in ansible.cfg or the environment,
the new code will continue to work (in fact, it won't know or care,
since it just uses the value set in the PlayContext).

This is submitted as a separate commit for easier review to address
backwards-compatibility concerns.
2015-10-02 21:26:25 +05:30
Abhijit Menon-Sen
1981bf2b95 Aggregate ssh arguments in PlayContext instead of the connection plugin
Using set_host_overrides() in the connection plugin to access the ssh
argument variables from the inventory didn't see group_vars/host_vars
settings, as noted earlier. Instead, we can set the correct values in
the PlayContext, which has access to all command-line options, task
settings, and variables.

The only downside of doing so is that the source of the settings is no
longer available in ssh.py, and therefore can't be logged. But the code
is simpler, and it actually works.

This change was suggested by @jimi-c in response to the FIXME in the
earlier commit.
2015-10-02 21:26:25 +05:30
Abhijit Menon-Sen
3ad9b4cba6 Rework additional ssh argument handling
Now we have the following ways to set additional arguments:

1. [ssh_connection]ssh_args in ansible.cfg: global setting, prepended to
   every command line for ssh/scp/sftp. Overrides default ControlPersist
   settings.
2. ansible_ssh_common_args inventory variable. Appended to every command
   line for ssh/scp/sftp. Used in addition to ssh_args, if set above, or
   the default settings.
3. ansible_{sftp,scp,ssh}_extra_args inventory variables. Appended to
   every command line for the relevant binary only. Used in addition to
   #1 and #2, if set above, or the default settings.
3. Using the --ssh-common-args or --{sftp,scp,ssh}-extra-args command
   line options (which are overriden by #2 and #3 above).

This preserves backwards compatibility (for ssh_args in ansible.cfg),
but also permits global settings (e.g. ProxyCommand via _common_args) or
ssh-specific options (e.g. -R via ssh_extra_args).

Fixes #12576
2015-10-02 21:26:25 +05:30
Brian Coca
4c9f58a152 added no_log censoring to item output
should be last commit that fixes #12214
2015-10-02 09:11:41 -04:00
James Cammarata
57372906aa Pull host/group vars when adding hosts/groups
Fixes #12582
2015-10-02 02:47:09 -04:00
James Cammarata
8ef78b1cf8 Fixing accelerated connection plugin 2015-10-02 00:50:02 -04:00
Brian Coca
de2f62bd9e fixed error reporting for unkown become user 2015-10-01 18:58:16 -04:00
Brian Coca
6d6bfbc3d2 added missing import for pwd, was being obscured by exception catching and fallback 2015-10-01 18:56:30 -04:00
Brian Coca
6b842d9c49 fixed incorrect data passing on certain events 2015-10-01 18:49:51 -04:00
Brian Coca
2463922306 fixed error reporting when missing redis import 2015-10-01 18:49:51 -04:00
Brian Coca
6e96188085 added missing entry for dealing with bcc 2015-10-01 18:49:51 -04:00