Michael DeHaan
99c39b1ff3
By popular request, make the no_log attribute also censor tasks from callbacks.
2014-08-12 13:36:05 -04:00
James Cammarata
fc7859f445
Make sure playbook_dir variable is an absolute path
...
Fixes #8317
2014-08-12 09:51:44 -05:00
James Cammarata
4940a7ad77
Merge pull request #8458 from Jmainguy/runner_8404
...
Fixes 8362, returns stderr if No space left on device
2014-08-11 23:16:57 -05:00
Michael DeHaan
56f9328f93
Merge
2014-08-11 12:22:47 -04:00
Michael DeHaan
8c4161d4a1
Merge branch 'retf_py' of git://github.com/berendt/ansible into devel
...
Conflicts:
lib/ansible/inventory/vars_plugins/group_vars.py
plugins/callbacks/mail.py
2014-08-08 12:17:37 -04:00
Michael DeHaan
48a0236ec6
Merge pull request #6619 from sergevanginderachter/ansible_version_var
...
Introduce an ansible_version dict as runner variable
2014-08-08 11:20:17 -04:00
Jonathan Mainguy
535ebc4c56
Fixes 8362, returns stderr if No space left on device
2014-08-05 15:18:49 -04:00
Serge van Ginderachter
8f39c114d8
template Runner.module_vars['delegate_to'] to accommodate callbacks
2014-08-05 15:16:43 +02:00
James Cammarata
6d94ae64ec
Remove unnecessary unicode conversions from parse_kv
...
Fixes #8425
2014-08-04 09:59:08 -05:00
James Cammarata
e6fa50a306
Move splitter to module_utils so modules can use it and fix command arg splitting
...
Fixes #8338
2014-07-29 14:55:16 -05:00
Michael DeHaan
630f080cf0
Start of unit tests for split_args function, moved split_args to utils since not needed by modules (so far).
2014-07-24 20:15:04 -04:00
James Cammarata
43154e5101
Using custom splitting function for module param counting
2014-07-24 14:42:35 -05:00
James Cammarata
2cc602beea
Fixes for module param counting and additional shell quoting issues
2014-07-23 22:54:59 -05:00
James Cammarata
84759faa09
Security fixes:
...
* Strip lookup calls out of inventory variables and clean unsafe data
returned from lookup plugins (CVE-2014-4966)
* Make sure vars don't insert extra parameters into module args and prevent
duplicate params from superseding previous params (CVE-2014-4967)
2014-07-21 11:20:49 -05:00
James Cammarata
e74853300a
Merge branch 'task-host-loop-bypass' of https://github.com/sivel/ansible into sivel-task-host-loop-bypass
2014-07-14 14:21:25 -05:00
James Cammarata
8ed6350e65
When parsing json from untrusted sources, remove templating tags
2014-07-01 14:14:14 -05:00
Chris Church
6aaad5dc9b
Fix missing arg for _remote_chmod method.
2014-06-23 06:09:08 -04:00
Chris Church
dd3f7c2dab
Fix trailing slash on returned temp path.
2014-06-19 16:20:18 -05:00
Michael DeHaan
35a7c93c76
Added comment about implementation line.
2014-06-19 14:24:13 -05:00
Michael DeHaan
3ac86e57f4
FIXME comment cleanup
2014-06-19 14:24:13 -05:00
Michael DeHaan
80499346d1
Remove stray FIXME
2014-06-19 14:24:13 -05:00
Chris Church
5dcaa30476
Add shell_plugins to abstract shell-specific functions out of runner, add winrm connection plugin, add initial Windows modules.
2014-06-19 14:24:12 -05:00
James Cammarata
d9df607972
Fix order of merging variables for the combined cache
...
Fixes #7598
2014-06-04 10:50:41 -05:00
Isao Jonas
72524e1f3b
dont mutate inventory vars
2014-05-27 19:07:58 -05:00
James Cammarata
d77a6965b3
Merge module_vars into inject during template instead of updating
...
This way we won't overwrite values that are stored in the inject
with module_vars that should be lower precedence.
Fixes #7510
2014-05-23 13:36:45 -05:00
Matt Martz
0e953c2863
Add run_once task key
...
This caused the task to act like bypass host loop plugin and
execute only on a single host. Can be used with delegate_to
2014-05-19 12:33:47 -05:00
James Cammarata
79731ce491
Evaluate changed_when only if task is not skipped
...
Fixes #7405
2014-05-14 16:04:37 -05:00
Chris Church
d725636469
Correctly initialize combined_cache for hosts if setup is skipped
...
Fixes #7364
2014-05-12 13:48:11 -05:00
James Cammarata
fd27afdc0d
Adding ansible_shell_type and basic environment construction on it
...
Previously we assumed the shell on the target systems were 'sh'-
compliant when formatting environment variables preceding command
strings. This patch corrects that by basing the target shell type
on the DEFAULT_EXECUTABLE setting, which can be overridden on a
per-host basis using the inventory variable 'ansible_shell_type'.
Fixes #7352
2014-05-09 16:29:56 -05:00
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
Christian Berendt
6676720ce5
fixed typos found by RETF rules in PY files
...
rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
2014-05-03 18:40:05 +02: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
Serge van Ginderachter
d240e2b9fb
Introduce an ansible_version dict as runner variable
...
Given the version:
"1.6 (ansible_version_var 14499e8bf3
) last updated 2014/03/21 17:07:50 (GMT +200)"
We get the special variable:
"ansible_version": {
"full": "1.6",
"major": 1,
"minor": 6,
"revision": 0,
"string": "1.6 (ansible_version_var 14499e8bf3
) last updated 2014/03/21 17:07:50 (GMT +200)"
}
modified: lib/ansible/playbook/__init__.py
modified: lib/ansible/runner/__init__.py
modified: lib/ansible/utils/__init__.py
2014-04-08 17:14:42 +02: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