James Cammarata
2e2e5d5321
Use the existing module_vars during the templating of module_vars
...
Since some of the vars contained in there may be used in the templating
of other variables. This also reverts e83a494
which originally fixed
issue #6979 but broke some other variable related things.
Fixes #6979
Fixes #7321
Fixes #7332
2014-05-08 13:09:36 -05:00
James Cammarata
deb532c367
Remove OrderedDict references from runner
...
Fixes #7256
2014-05-02 12:52:36 -05:00
James Cammarata
54b1f820fb
Modify the way we set the localization environment
...
Previously, we set the LANG (and LC_CTYPE) environment variables
directly in the module code and applied them with os.environ().
Instead, we are now pre-pending those variables to the environment
string used to execute the command which allows the user to
override the localization values by setting the environment values
directly (even on a per-task basis):
- subversion: repo=file:///path/to/repos/svn_über dest=/tmp/svntest
environment:
LANG: "C"
LC_CTYPE: "en_US.UTF-8"
So if a user wishes to default their LANG back to C, they can still
avoid unicode issues by doing the above.
Fixes #7060
2014-05-01 10:34:53 -05:00
James Cammarata
be4e6d359f
Merge branch 'delegate_to_honor_ssh_private_key_file' of https://github.com/renard/ansible into renard-delegate_to_honor_ssh_private_key_file
2014-04-29 15:05:09 -05:00
Matt Martz
eb8759176f
Allow sudo to another user from root
2014-04-23 16:14:48 -05:00
James Cammarata
a32dd34359
Make sure HostVars object is instantiated before assigning it
...
Fixes #7006
2014-04-18 16:23:01 -05:00
Sébastien Gross
22d6572270
Honor ansible_private_key_file for delegated hosts
...
If a delegated host is not found in the inventory specified
private_key_file for primary host was not used.
This allows running playbooks without having to define any inventory at
all and to use the same ssh private key for both primary host and
delegated one.
2014-04-18 01:48:02 +02:00
smoothify
48bf7a000d
Try to pass in item to on_skippped callback.
2014-04-16 15:40:07 +01:00
James Tanner
aad128bac7
Use combined cache for templating module vars
...
Fixes #6901
2014-04-15 10:56:48 -05:00
James Tanner
318e752b6f
Fixes #6845 evaluate changed_when only if task is not skipped
2014-04-07 10:51:04 -04:00
James Tanner
5a65dc3b6a
Fixes #6820 fix erroneous missing vault password error when using the template module
2014-04-04 13:06:35 -04:00
James Tanner
cdc0819939
Fixes #6088 turn off sudo and su if the connection is local the sudo user matches the current user
2014-04-03 12:02:51 -04:00
James Cammarata
e2d86e4f43
Splitting SETUP_CACHE into two caches, one for host vars and one for setup facts
2014-04-01 16:23:33 -05:00
James Cammarata
b9c044b8c9
Making the exception caught during os.dup of stdin explicit
...
Related to f23bb34
2014-03-31 13:50:23 -05:00
James Cammarata
f23bb344aa
Catch errors when duping stdin
...
Fixes #6657
2014-03-31 13:38:12 -05:00
Paul Oyston
1942a69ed2
Added template call to _executor_internal to allow the passing of arbitrary data to modules.
2014-03-27 17:06:20 +00:00
James Cammarata
7a3fa63db5
Fix for unicode environment variable handling
...
Fixes #5395
2014-03-25 20:45:04 -05:00
James Cammarata
c9bf7eb9bb
Don't run {failed|changed}_when checks until async_status is done
...
Fixes #5117
2014-03-25 14:18:47 -05:00
Michael DeHaan
94e3350b38
Catch a unquoted line error. Fixes #6532
2014-03-17 17:15:42 -04:00
James Tanner
20262b6c15
Remove unused variable in _executor_internal
2014-03-17 15:53:48 -04:00
Michael DeHaan
6144c5e1e2
Merge pull request #5714 from eggsby/patch-2
...
Allow templates in ansible_sudo_pass inventory var
2014-03-16 15:42:12 -05:00
Cristian Ciupitu
0749112286
Micro-optimization: replace s.find(x)!=-1 with x in s
...
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-16 13:10:28 -04:00
James Cammarata
6c25e78299
Merge branch 'devel' of https://github.com/dparalen/ansible into dparalen-devel
2014-03-11 15:34:15 -05:00
Richard Isaacson
4993cb57f4
Merge pull request #6283 from magicrobotmonkey/upstream
...
fix missing stdin in _parallel_runner
Tested with GIST https://gist.github.com/risaacson/7290d30a612e0c70ea1b .
Passes "make tests"
Passes non_destructive tests.
2014-03-10 14:38:56 -05:00
Michael DeHaan
d2cb35f898
Merge pull request #6320 from angstwad/instance-redo
...
Use isinstance() rather than a check using type()
2014-03-07 20:41:33 -06:00
James Cammarata
f80d02d841
Properly wrap logical elements together for su/sudo detection
2014-03-07 00:07:10 -06:00
Paul Durivage
3cce3650e5
Use isinstance() rather than a check using type()
2014-03-06 16:16:25 -06:00
Andrew Resch
4d80019ac8
Fix logic checking for both sudo and su, and their respective users
2014-03-06 10:24:16 -08:00
aresch
23a0468a4b
Fix respecting remote_tmp when sudo is used
2014-03-05 16:25:42 -08:00
Luca Berruti
7cf363910a
fixes #6244
2014-03-05 09:18:01 +01:00
Aaron Bassett
5c589af191
fix missing stdin in _parallel_runner
2014-03-04 16:00:26 -05:00
Richard Isaacson
e79d859dfb
Merge pull request #6213 from sergevanginderachter/fix-delegate-templating
...
Fixes templating of ansible_ssh_host for delegates.
Tested that this works. Confirmed.
2014-03-03 23:10:09 -06:00
Michael DeHaan
46ec8759d5
Remove the legacy templating code, which was guarded by deprecation warnings in the previous two releases, and undocumented for a long time. use {{ foo }} to access variables instead of ${foo} or $foo.
2014-02-28 18:38:45 -05:00
James Cammarata
79645535c0
Handle empty results from failed connections in _remote_md5()
...
Fixes #5800
2014-02-28 12:50:03 -06:00
Gilles Cornu
04f6367172
Fully clean 'ssh_old' and 'paramiko_alt' options
...
These transports have been removed in 33857855ad
2014-02-28 18:28:04 +01:00
Serge van Ginderachter
9833263417
Fixes templating of ansible_ssh_host for delegates
2014-02-27 18:06:34 +01:00
James Cammarata
c11e2100e0
Save the original transport in runner after detecting the smart transport
...
Fixes #6192
2014-02-27 10:30:50 -06:00
James Tanner
876035c0b1
Fixes #6161 Get the delegate host info properly from the hostvars object
2014-02-25 11:18:06 -05:00
James Tanner
0f95a905d9
Fixes #5965 Ensure the inject for each item in a loop is un-altered
2014-02-24 20:54:26 -05:00
jctanner
93c746db9c
Merge pull request #5651 from nikut/sshfix
...
allow ansible_ssh_private_key_file to be templated (thanks to benno)
2014-02-24 14:26:48 -05:00
James Tanner
4af1d6098b
Fixes #5939 Allow for delegate hosts that are not in inventory
2014-02-21 15:54:09 -05:00
James Tanner
427b8dc78d
Ansible vault: a framework for encrypting any playbook or var file.
2014-02-18 15:35:12 -05:00
Niku Toivola
2faaff78ee
removed comment
2014-02-18 11:32:06 +02:00
Niku Toivola
68a3e8163e
allow ansible_ssh_private_key_file to be templated (thanks to benno)
2014-02-18 11:32:05 +02:00
Brian Coca
31b5728618
directory detection should now work on BSDs, added AIX alternate path
2014-02-13 08:23:56 -05:00
Michael DeHaan
633d685bb7
Revert "Revert "Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks"""
...
This reverts commit 73ca1a173c
.
2014-02-07 20:38:20 -05:00
Michael DeHaan
ad8c275887
Revert "While the previous work on the foon class can't be quite recycled, it's still a nice abstraction."
...
This reverts commit caab52aee2
.
2014-02-07 20:38:18 -05:00
Michael DeHaan
caab52aee2
While the previous work on the foon class can't be quite recycled, it's still a nice abstraction.
2014-02-07 19:32:19 -05:00
Michael DeHaan
73ca1a173c
Revert "Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks""
...
This reverts commit 6685b4989e
.
2014-02-07 18:14:27 -05:00
Michael DeHaan
6685b4989e
Revert "This patch makes Ansible reuse fork allocation between seperate instantations of the runner API, therefore the overhead of recreating forks"
...
This reverts commit 85d66b9a0c
.
2014-02-07 18:10:38 -05:00