Toshio Kuratomi
62979efa14
Finish up plugin porting to global display
...
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
Toshio Kuratomi
186e034515
Move the rest of executor code to global display
2015-11-11 10:44:22 -08:00
Toshio Kuratomi
e45ce871a7
Fix for traceback when neither name nor pkg are in the module params
2015-11-11 07:32:21 -08:00
James Cammarata
a99f2fd52f
Save delegated vars in result for use in callback methods
...
Fixes #13014
2015-11-10 10:14:30 -05:00
Yannig Perré
0c360d17cb
New parameter for template method.
...
We do not compute hash when we know that the result does not need to be cached (like with_items loop).
It also result in a small speed improvement.
2015-11-10 07:19:19 +01:00
Toshio Kuratomi
1a04f354f3
For with_first_found loops, set undefined variables to fall through rather than failing the task
2015-11-09 10:51:54 -08:00
James Cammarata
63c47fb271
Fixing up performance
2015-11-05 16:22:37 -05:00
Toshio Kuratomi
4f6d4c6bf6
Set task_action when the action does not need to be templated
...
Fixes #13042
2015-11-05 08:38:21 -08:00
Toshio Kuratomi
483491ddfb
template the task_action before checking whether to optimize with_item loops for it.
...
Fixes the second problem discovered in #12976
2015-11-04 19:41:55 -08:00
Toshio Kuratomi
9e758d3d97
Do not optimize with_items loop if the items are not strings
...
The code isn't sophisticated enough to understand lists and dicts yet.
This mirrors how 1.9.x handled non-string items so its not a regression.
One portion of a fix for #12976
2015-11-04 18:48:41 -08:00
James Cammarata
a5bd92ca4b
Merge branch 'devel_fix_debug_var' of https://github.com/Yannig/ansible into Yannig-devel_fix_debug_var
2015-10-30 08:37:03 -04:00
James Cammarata
479cbfc63c
Don't immediately fail on PlayContext setup
...
As we may end up skipping the task due to conditionals.
Fixes #12774
2015-10-29 19:23:42 -04:00
Yannig Perré
1febf7cb88
Fix for issue #12952 : this code interfere with debug+var and seems to be unnecessary.
2015-10-28 22:09:13 +01:00
James Cammarata
3fc2209ca0
Fixing retry/until logic and default value for retries
...
Fixes #12928
Fixes #12929
2015-10-27 15:37:48 -04:00
Toshio Kuratomi
92dd563a75
Fix invocation from bad merge and note where it would need to go to keep
...
it out of registered vars as well.
2015-10-24 07:29:42 -07:00
James Cammarata
86de1429e5
Cleaning up FIXMEs
2015-10-22 16:03:50 -04:00
Brian Coca
fc3a44485b
skip errors on conditional if task is include
...
fixes #12843
2015-10-22 07:50:43 -04:00
James Cammarata
ec56b29ba4
Fix setting of interpreter values for delegated hosts
...
Fixes #12772
2015-10-21 11:05:45 -04:00
Victor Salgado
c5c5f3bf7a
Revert back to copying self._task.args
2015-10-20 16:21:25 -02:00
Victor Salgado
0e671baa33
Fix typo
2015-10-20 16:18:01 -02:00
James Cammarata
892d9b8dfb
Move post_validate for tasks after checking for an include
...
Simplifies logic and prevents us from accidentally post_validating
an include that would otherwise be skipped due to tags causing a
problem because of potentially missing variables.
Fixes #12793
2015-10-19 13:42:17 -04:00
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
James Cammarata
d91b3c6b9d
Make sure magic variables are available when templating vars_files
...
Also does some reorganization/cleanup on the magic vars/delegated
variable generation portions of VariableManager to make the above
possible.
Fixes #12633
2015-10-05 16:32:58 -04: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
Brian Coca
ba4afcbbb6
added no_log to results
...
normalized outputs to use display class
cleaned up unused imports
2015-10-02 09:11:41 -04:00
James Cammarata
8ef78b1cf8
Fixing accelerated connection plugin
2015-10-02 00:50:02 -04:00
James Cammarata
31d5f88a1d
Use the task loop to calculate multiple delegated hosts
...
Due to the way we're now calculating delegate_to, if that value is based
on a loop variable ('item') we need to calculate all of the possible
delegated_to variables for that loop.
Fixes #12499
2015-09-25 01:41:09 -04:00
Brian Coca
de18bcb95f
correct typo on error reporting
...
fixes #12495
2015-09-23 10:11:52 -04:00
James Cammarata
88e1aa94fa
Add play context vars to list of variables before post validation
...
Fixes #12437
2015-09-19 21:51:24 -04:00
James Cammarata
1f5584aa5b
Refactoring delegate_to code
...
Now, instead of relying on hostvars on the executor side, we compile
the vars for the delegated to host in a special internal variable and
have the PlayContext object look for things there when applying task/
var overrides, which is much cleaner and takes advantage of the code
already dealing with all of the magic variable variations.
Fixes #12127
Fixes #12079
2015-09-18 15:25:10 -04:00
James Cammarata
fa69e8ebb8
Fixing some bugs in _compute_delegate() in TaskExecutor
...
* Clearing interpreter settings from variables, so those set for the
original host aren't incorrectly applied to the delegated to host
* Fixed incorrect string for remote user in delegated hosts hostvars
* Properly looking for multiple possiblities in the delegated-to hosts
hostvars (ansible_ssh_host vs. ansible_host)
2015-09-18 15:25:10 -04:00
James Cammarata
cc6627cdd6
Remove custom json encoder cleaner and strip proxy var stuff out before encoding
...
Fixes #12349
2015-09-17 16:04:47 -04:00
Abhijit Menon-Sen
575a8b8c77
Merge Host.ipv[46]_address into .address
...
The earlier distinction was never used; .ipv6_address was always a copy
of .ipv4_address, and the latter was always used to set the remote_addr
field in the PlayContext.
Also uses the canonical ansible_host/ansible_port names when setting the
address and port from variables.
2015-09-17 23:03:48 +05:30
James Cammarata
a7e1113b26
Removing FIXME comment which is no longer required
2015-09-15 14:47:49 -04:00
James Cammarata
60c139e482
Fix logic for changed/failed_when + retry/until loops
...
Fixes #11809
2015-09-15 13:37:35 -04:00
James Cammarata
8e664ad226
Fix delegate_to localhost vs. 127.0.0.1 (and ::1)
2015-09-15 13:08:54 -04:00
James Cammarata
0c5bbe3c32
Use the original (un-templated) args for include params
...
Fixes #12314
2015-09-11 00:53:27 -04:00
James Cammarata
be7bd392cb
Fix unreachable host detection and have plays continue after unreachable failures
...
Fixes #12284
2015-09-09 15:27:26 -04:00
Brian Coca
0dbebfddaa
Revert "remove closing connections after every task, this goes against conneciton caching and was not expected behaviuor nor inhertited from v1"
...
needed for winrm, disabled closing connections in ssh to avoid issues with that persistance, need to normalize all this in future
This reverts commit 23a22397bf
.
2015-09-09 14:21:56 -04:00
James Cammarata
30399edada
Use UnsafeProxy for lookup results too
...
Also fixes a couple of bugs that popped up when using the proxy class
2015-09-08 12:19:39 -04:00
Brian Coca
23a22397bf
remove closing connections after every task, this goes against conneciton caching and was not expected behaviuor nor inhertited from v1
2015-09-04 10:11:25 -04:00
James Cammarata
8774ff5f57
Make sure PlayContext is copied when iterating in a with_ loop
2015-09-03 08:11:30 -04:00
Toshio Kuratomi
1ae28f606b
Refactor to replace filter and lambda with a generator expression
2015-09-03 00:06:34 -07:00
Marius Gedminas
823677b490
Replace .iteritems() with six.iteritems()
...
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host). And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00
James Cammarata
057712c129
Also move action/connection plugins to shared plugin loader code
...
Fixes #12099
2015-08-28 16:32:09 -04:00
James Cammarata
266a069a73
Merge pull request #12107 from TravisPaul/devel
...
Update "smart" transport to handle Sun_SSH_1.5 on SmartOS
2015-08-28 10:43:48 -04:00
Marius Gedminas
0c6ce31f76
Use 'except ... as' syntax
...
This syntax works on Python 2.6 through 3.x. lib/ansible/module_utils
(and lib/ansible/modules) need to support Python 2.4, so I didn't touch
those.
2015-08-27 22:15:04 +03:00
Travis Paul
604f825a8e
Update "smart" transport to handle Sun_SSH_1.5 on SmartOS
2015-08-26 15:00:45 +00:00
Brian Coca
a4ffa09414
Merge pull request #11880 from bcoca/configurable_squash
...
made squashable with_ plugin list configurable
2015-08-23 13:32:15 -04:00
Brian Coca
e8b86f448d
fix issue with improper connection override in delegation
2015-08-19 20:36:08 -04:00