Commit Graph

1187 Commits (0317e7b91029ce90079802f125155c1944cf279c)

Author SHA1 Message Date
Toshio Kuratomi c86851be2c Quote ControlPath ssh parameter
Fixes #9316
2014-10-22 18:45:02 -04:00
James Cammarata b4f9631e4c Revert "remove complex_args_hack as it was only needed for Baby JSON"
This reverts commit a6029264b8.

Fixes #9400
2014-10-22 11:00:24 -05:00
James Cammarata 4c47c2273a Use convert_bare instead of string formatting for raw vars in debug action plugin 2014-10-22 11:00:24 -05:00
Toshio Kuratomi feb9ed1de8 Fix template module incorrectly handling mode when dest is a directory
Fixes #9350
2014-10-21 00:22:24 -04:00
James Cammarata 2eda9a3a47 Fixing item loop when undefined variable errors occur because of missing attributes
Fixes a case where the variable 'foo' may exist, but the with_items loop
was used on something like 'foo.results', where 'results' was not a valid
attribute of 'foo'. Prior to this patch, conditionals were not evaluated
until later, meaning there was no opportunity to allow a test to skip the
task or item based on it being undefined.
2014-10-10 12:26:04 -05:00
James Cammarata d19fe8d95d Fetch vars for host directly when calculating the delegated user
This fixes the case in which the delegated to host may not be in the
specified hosts list, in which cases facts/vars for the host were
not available in the injected hostvars.

This also fixes the inventory variable fetching function, so that an
unknown host raises a proper error as opposed to a NoneType exception.

Fixes #8224
2014-10-10 01:18:18 -05:00
Toshio Kuratomi a6029264b8 remove complex_args_hack as it was only needed for Baby JSON 2014-10-08 13:26:25 -04:00
James Cammarata f3714c88a6 Revert "atfork import warning should be suppressed when system_warnings = False"
This reverts commit a175168686.
2014-10-06 15:05:52 -05:00
Bruce Pennypacker a175168686 atfork import warning should be suppressed when system_warnings = False
Fixes #9247
2014-10-03 15:48:56 -05:00
James Cammarata 313f26f866 Fix issue with vars precedence from roles
Fixes #9219
2014-09-30 15:50:46 -05:00
Toshio Kuratomi 0af750e3e5 Merge pull request #9182 from bbasleeper/feature_sudo_exe_from_inventory
Add a new inventory parameter (ansible_sudo_exe) to specify sudo command...
2014-09-30 14:55:46 -04:00
Michael DeHaan c02e8d8c80 Don't search powershell modules unless using the winrm connection. 2014-09-28 12:17:03 -04:00
Michael DeHaan 91c5890247 Add some helpful detection if core modules are not found for those running on the development branch. 2014-09-28 11:31:51 -04:00
Bruno BAILLUET a25da4af05 Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path. 2014-09-27 17:39:49 +02:00
Michael DeHaan e5116d2f9b changes for package loading of modules 2014-09-26 11:25:56 -04:00
James Cammarata 6af5455edc Default 'smart' connection to paramiko for OSX platforms
Due to the long-standing bug in sshpass, which can crash OSX.

Fixes #5007
2014-09-25 19:22:35 -05:00
James Cammarata 19703617b8 Fix action_plugins for modules not respecting check mode
Fixes #9140
2014-09-25 11:11:52 -05:00
James Cammarata 4e9c061b35 Also make sure the dest param is expanded locally before recalculating 2014-09-23 15:36:24 -05:00
James Cammarata e47f6137e5 Push the expanduser call on the source down to slurp rather than fetch
Also moves the calculation of the destination file name until after
the slurp of the file contents, since the source as returned by slurp
may now be different, so we want to use that expanded path locally.

Fixes #8942
2014-09-23 15:32:07 -05:00
Toshio Kuratomi f16e107b72 Merge pull request #9014 from willthames/paramiko_sudo_no_prompt
Allow _remote_md5 to work with passwordless sudo even if password is supplied
2014-09-22 16:02:00 -04:00
James Cammarata da5de725d7 Allow with_first_files to search relative to templates and vars in roles
Fixes #8879
2014-09-18 16:05:30 -05:00
James Cammarata c3612e08f9 Move delegate_to out of runner module_vars to prevent bleeding across runs
Previously, the delegate_to value was stored in the module_vars of runner,
which could lead to bleeding that value across runs and incorrect hosts
being delegated to. This patch moves the value to a local variable in
the Runner class with some related refactoring of _compute_delegate() in
Runner (since the value is no longer required to be a parameter).

Fixes #8705
2014-09-17 14:24:31 -05:00
James Cammarata ed3c9c40ca Redoing patch for hostvars fix, since the previous one broke other tests 2014-09-17 11:04:10 -05:00
James Cammarata 3180a37457 Revert "Revert to using just the combined_cache for HostVars"
This reverts commit e9229cfeaa.
2014-09-17 11:04:10 -05:00
James Cammarata e9229cfeaa Revert to using just the combined_cache for HostVars 2014-09-17 02:32:09 -05:00
James Cammarata 4a9cf3f3f2 Allow hostvars variables to be templated
Fixes #7844
2014-09-16 14:25:55 -05:00
James Cammarata b376e208c7 Adding "follow" param for file/copy options
Also modifies the template action plugin to use this new param
when executing the file/copy modules for templating so that links
are preserved correctly.

Fixes #8998
2014-09-16 12:05:55 -05:00
Will Thames 2303044ffc Applied fix for sudo with no prompt to paramiko
Effectively reproduces @sivel's work from #8900 but for
the paramiko connection. Fixes #8418 when using paramiko

This allows `_remote_md5` to work if a sudo password is
passed in when no sudo password is required.
2014-09-16 10:25:21 +10:00
Matt Martz de77f33796 Don't throw away useful stdout and stderr. Fixes #8418
When supplying a sudo password to a server that uses passwordless sudo,
we should not throw away useful stdout and stderr. This is particularly
important for modules that perform md5 checks as part of the pre module
execution.
2014-09-16 10:25:21 +10:00
James Cammarata cdf938f2c2 Ensure remote files are chmod'd properly for su/su_user too
Fixes #8594
2014-09-15 13:15:46 -05:00
James Cammarata 0c4a7492bf Ensure checkmode is honored for templates that haven't changed
Fixes #8998
2014-09-15 11:37:53 -05:00
Michael DeHaan fb13e2bf2e Merge pull request #8853 from kvar/devel
zypper: handle lists of packages efficiently
2014-09-11 17:30:21 -04:00
James Cammarata 178075489b Merge branch 'gh-7432' of https://github.com/hfinucane/ansible into hfinucane-gh-7432 2014-09-11 12:42:52 -05:00
Michael DeHaan d9e0a5ed22 Use correct keyword for this function. 2014-09-11 12:32:51 -04:00
Michael DeHaan 26cdddaebf Tracebacks are now catchable with ignore_errors and have streamlined output. Also removes 'baby-JSON' for bash modules. 2014-09-11 12:27:21 -04:00
James Cammarata dacb6b8561 Use utils.merge_hash() instead of update for cache merging
Fixes #8968
2014-09-10 16:39:02 -05:00
James Cammarata a571fd4efe Convert boolean strings from set_fact to proper boolean values
Also adds integration tests for booleanification of strings

Fixes #8629
2014-09-10 09:56:39 -05:00
James Cammarata 10afaee108 Fixing new caching related issue with host vars
The vars_cache was not being properly merged with the setup_cache
for all hosts, which was previously not noticed when registered
variables were stored in the setup_cache.

Fixes #8944
2014-09-09 15:37:15 -05:00
James Cammarata 1711df3b75 Allow complex_args to be None 2014-09-08 08:44:53 -05:00
James Cammarata 8cc3543918 Re-allow templating of complex_args, but count params to prevent injection
Fixes #8810
2014-09-05 14:24:05 -05:00
Michael Scherer 53830123fd Make ssh debug easier to read and paste
Currently, ansible -vvvv show the following:

    hostname EXEC ['ssh', '-C', '-vvv', '-o', 'ControlMaster=auto',

This is not good if someone want to cut and paste it to see if something
is wrong with the command line, so join the dictionnary strings with spaces
to have 1 string in the output.
2014-09-03 21:04:14 +02:00
Kristofor Varhus acd37c87a9 zypper: handle lists of packages efficiently 2014-09-02 09:38:30 -04:00
Henry Finucane 36632c9529 Ensure ansible_job_id exists even for not-started jobs 2014-09-01 16:31:37 -07:00
Chris Church 2ddab7affc Merge pull request #8793 from cchurch/powershell3_compat
Replace Get-FileHash with MD5 code that works on PowerShell 3.
2014-08-28 21:25:06 -04:00
James Cammarata ab495d1916 Set the shell variable on the ssh connection type for accelerated mode
Fixes #8799
2014-08-28 08:22:24 -05:00
Chris Church 0d1197a995 Replace Get-FileHash with MD5 code that works on PowerShell 3. 2014-08-28 01:42:22 -04:00
James Cammarata a6ad374668 Use split_args directly to check for omitted params 2014-08-27 11:51:03 -05:00
James Cammarata 04da466c7b Fixing up serialize_args utility function 2014-08-27 10:20:07 -05:00
James Cammarata e99db078b4 Additional fixes for the new omit parameter variable 2014-08-27 10:06:55 -05:00
Victor Lin fe88ba7c8d Undo changes to filter module 2014-08-27 10:04:47 -05:00