Daniel Hokka Zakrisson
43d22b0c42
Flatten argument to with_items
...
Fixes #1711 .
2013-02-17 22:08:23 +01:00
Michael DeHaan
1ecf4a6943
Working on complex argument support.
2013-02-17 15:01:49 -05:00
Michael DeHaan
fa21b41357
Fixup the pipe_once plugin
2013-02-17 11:42:45 -05:00
Michael DeHaan
0af83317a1
Added a $PIPE_ONCE lookup plugin, that caches the result so it is only evaluated one time.
2013-02-17 11:37:41 -05:00
Michael DeHaan
b365e04616
Allow add_host to add hosts to multiple groups, groups is now an alias for groupname.
2013-02-17 11:22:50 -05:00
Rob Parrott
ef17fc9f20
add the ability to take variables in the add_host module, and be willing to parse a host:port hostname handed to add_host
2013-02-16 20:27:38 -05:00
Michael DeHaan
c8878998d1
update some of many copyright dates but we can just do this when editing each file, not super high priority
2013-02-16 15:32:01 -05:00
Blair Zajac
fa8e653011
Simplify and correct comparisons with None.
2013-02-16 13:32:48 -05:00
Daniel Hokka Zakrisson
7e2999ed2d
Add directory detection to _remote_md5 and use this in copy
...
If it is a directory, change the destination path by appending the
basename of the source file, like is done if the destination ends with a
/, and try to get the MD5 of the new path.
2013-02-12 22:39:05 +01:00
Daniel Hokka Zakrisson
89e73c123f
Fix tilde expansion for fileglob
...
Use common suffix to determine what part of original term to keep and
how much of the full path to combine to get a usable filename.
2013-02-11 23:43:27 +01:00
Daniel Hokka Zakrisson
a1e00c93e5
Add ansible_ssh_user/pass to enable inventory-defined users
2013-02-10 23:22:18 +01:00
Daniel Hokka Zakrisson
c83e428a7e
Default expand_lists to True and set it to False for only_if
...
Fixes #2026 and #2027 .
2013-02-10 22:57:53 +01:00
Michael DeHaan
f7497e75e5
Able to use "environment: " on any task to pass proxy details and other useful settings. Can be a variable
...
or a dictionary.
2013-02-10 13:05:58 -05:00
Michael DeHaan
72a05ae2a0
Move diff code more into runner code.
2013-02-09 23:24:03 -05:00
Michael DeHaan
828119d823
Allow the remote username to come from a variable set in vars_files or vars
2013-02-09 22:42:35 -05:00
Matt Cordial
2ccfc8d2b6
Fix Issue #2025 where templates were not being transfered.
2013-02-08 12:03:54 -07:00
Michael DeHaan
a9162a86f2
Very basic --diff option for showing what happens when templates change.
...
Probably output is not useful if not used with --limit
Works well with --check mode
2013-02-07 22:52:25 -05:00
Daniel Hokka Zakrisson
f3305564e2
Add stderr contents to parse errors
2013-02-07 23:50:00 +01:00
Daniel Hokka Zakrisson
19f3cf45f4
Merge pull request #1982 from dex4er/feature_j2_filter_safe_yaml
...
Use yaml.safe_dump rather than yaml.dump. No more "!!python/unicode".
2013-02-07 13:24:08 -08:00
Daniel Hokka Zakrisson
dddfeac9c4
Allow using ${hostvars.<node>} for nodes not in SETUP_CACHE
...
This allows accessing inventory data from nodes that have not been
talked to (yet).
2013-02-07 18:40:41 +01:00
fdavis
21a5c55921
Add ConnectTimeout=DEFAULT_TIMEOUT to ssh args
2013-02-06 23:42:04 -08:00
Piotr Roszatycki
8cf268441e
Use yaml.safe_dump rather than yaml.dump. No more "!!python/unicode".
2013-02-04 13:40:07 +01:00
Daniel Hokka Zakrisson
1becc665b2
Fix missing ) in add_host
...
Fixes #1980 .
2013-02-04 12:21:33 +01:00
Michael DeHaan
fed82c2188
This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
...
shortly.
2013-02-03 20:34:13 -05:00
Daniel Hokka Zakrisson
a79373f6b2
Make template_ds the only templater
...
Instead of having to remember when to use which one, rename template_ds
to template and move the last bit of code from template to varReplace
(which gets used for all string replacements, in the end).
This means that you can template any data type without worrying about
whether it's a string or not, and the right thing will happen.
2013-02-03 14:01:54 +01:00
Michael DeHaan
f7aaa5ccc5
Fix copyright, unused imports
2013-02-02 13:06:48 -05:00
Michael DeHaan
857ccf7f6c
Add random choice plugin (with_random_choice)
2013-02-02 13:02:47 -05:00
Daniel Hokka Zakrisson
e166f71fcc
Get output before receiving return code
...
Fixes hangs observed with large amounts of output, as it would get into
a dead-lock.
2013-01-29 00:38:07 +01:00
Daniel Hokka Zakrisson
4d71b31f7e
Ensure destination and source are available before mangling them
...
Fixes #1918 .
2013-01-25 23:14:52 +01:00
Daniel Hokka Zakrisson
35b58955d6
Fix paramiko for when no private key is specified
2013-01-21 21:48:02 +01:00
Tim Gerla
4c64d0d6be
Expand ~ shell shortcuts for the --private-key argument
2013-01-20 13:16:29 -08:00
Daniel Hokka Zakrisson
d11262af4d
Fix raw (no executable) support on -c local
2013-01-13 15:16:13 +01:00
Daniel Hokka Zakrisson
5231be5d4b
Add sudo password support for local
2013-01-13 15:16:13 +01:00
Daniel Hokka Zakrisson
7ecab22302
Move sudo command making to one common function
2013-01-13 15:16:13 +01:00
Jayson Vantuyl
13ddd39db9
add with_sequence lookup plugin
...
Plugin allows you to do easy counts for items.
2013-01-09 15:30:24 -08:00
Dag Wieers
fb802beee7
In PR #1804 the use of C in script was moved to _low_level_execute_command()
...
So we cannot get rid of this one now.
2013-01-09 15:54:10 +01:00
Daniel Hokka Zakrisson
7782923ea2
Revert #1818 but avoid double-dwim, fixing relative fileglob
2013-01-09 14:52:52 +01:00
Daniel Hokka Zakrisson
891b1e371a
Default to not using an executable
...
For compatibility with older releases as well as avoiding things like
action: raw executable= show status
to communicate with devices that don't have sh.
2013-01-09 14:15:47 +01:00
Daniel Hokka Zakrisson
92ad206b84
Use re instead of shlex.split to find executable
...
shlex.split will strip quotes and it might not even be sh at this point.
2013-01-09 14:13:53 +01:00
Dag Wieers
b781438480
Clean up imports (taken from PR #1804 )
2013-01-09 13:51:27 +01:00
Daniel Hokka Zakrisson
1b5d039bf4
Extend executable= support in raw to include no execuable
...
Useful for managing not-UNIX things.
2013-01-08 17:45:37 +01:00
Daniel Hokka Zakrisson
4955587d8c
Merge pull request #1798 from dagwieers/raw-executable
...
Allow to change executable (shell/interpreter) when using raw
2013-01-08 08:35:08 -08:00
Daniel Hokka Zakrisson
637370089a
Skip polling when all hosts were skipped
...
Fixes #1823 .
2013-01-06 16:49:29 +01:00
Dag Wieers
eb36ff45b9
Make script module use raw module so it does not require python
2012-12-24 00:24:34 +01:00
Dag Wieers
846161a1a4
Allow to change executable (shell/interpreter) when using raw
...
This patch adds an optional 'executable=' option to the raw command line to override the default shell (/bin/sh), much like the shell module does.
2012-12-23 20:49:02 +01:00
Dag Wieers
988db558b3
Add return code and error output to raw module
...
Since we use 'raw' heavily on equipment where 'command' and 'shell' are not (yet) working (and python may need to be installed first using raw) these improvements are necessary in order to write more complex scripts (with return code handling and separated stdout/stderr).
This change includes the following changes:
- exec_command() now returns the return code of the command
- _low_level_exec_command() now returns a dict, including 'rc', 'stdout' and 'stderr'
- all users of the above interfaces have been improved to make use of the above changes
- all connection plugins have been modified to return rc and stderr
- fix the newline problem (stdout and stderr would have excess newlines)
In a future commit I intend to add assertions or error handling code to verify the return code in those places where it wasn't done. Since only the output was available, the return code was ignored, even though we expect them to be 0.
2012-12-23 18:04:54 +01:00
Daniel Hokka Zakrisson
97cc384ccf
Set basedir to . if there isn't one
...
This avoids special-casing '' = '.' everywhere the basedir gets used.
Fixes #1729 .
2012-12-19 13:22:57 +01:00
Daniel Hokka Zakrisson
b73016b881
Make all lookup plugins work with lists
...
Lookup plugins should accept a string or a list, and always return
a list, even if it is just one item.
2012-12-15 21:47:16 +01:00
Daniel Hokka Zakrisson
e54b4b1c9a
Ignore arguments when checking for interpreter, and re-add before use
2012-12-02 14:28:52 +01:00
Daniel Hokka Zakrisson
d5a456fbcf
Merge pull request #1697 from bcoca/mint
...
Implements multiple interpreter overrides
2012-12-02 05:28:28 -08:00