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
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
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
d703f92077
Disable authentication methods that weren't specified
2012-11-27 15:24:33 +01:00
Michael DeHaan
33196ec131
Merge pull request #1669 from dagwieers/ssh-tcgetattr2
...
Use proper pseudo-tty's instead of pipes when using subprocess
2012-11-24 08:30:26 -08:00
Dag Wieers
7192eb3047
Use proper pseudo-tty's instead of pipes when using subprocess
...
This change avoids the "tcgetattr: Invalid argument" error by making sure the ssh we start does have a proper pseudo-tty.
We could also check whether our current terminal is a proper terminal (by doing a tcgetattr ourselves) but I don't think this adds anything.
This closes #1662 (if all use-cases have been tested: sudo, passwd)
2012-11-23 22:39:30 +01:00
Daniel Hokka Zakrisson
db1a65342a
Set -c local cwd to . if basedir is empty
2012-11-23 13:36:09 +01:00
Daniel Hokka Zakrisson
ddef608c94
Wrap all remote commands in sh
2012-11-22 20:06:30 +01:00
Daniel Hokka Zakrisson
bdf05ec9a0
Use runner's basedir as cwd for -c local
2012-11-20 15:36:43 +01:00
Daniel Hokka Zakrisson
e6fed9f216
Add password support to -c ssh via sshpass
2012-11-16 23:46:49 +01:00
Michael DeHaan
096607eea4
Allow fireball to transfer binary files, fixup fireball docs, make fetch work with fireball.
2012-11-14 18:37:17 -05:00
Michael DeHaan
325025a5b6
Merge pull request #1574 from dhozac/ssh-moar-data
...
Make sure we get all data
2012-11-09 05:08:27 -08:00
Daniel Hokka Zakrisson
e97a22603f
Make sure we get all data
2012-11-09 11:24:57 +01:00
fdavis
b1dbeec66c
Allows use of scp instead of sftp in
...
Added a boolean constant scp_if_ssh to the config
Added scp support for the ssh connection plugin
Refers to #1279
2012-11-05 14:25:40 -08:00
Daniel Hokka Zakrisson
1052dd9c8f
Initialize sftp variable to fix error on transferless session
2012-10-26 23:54:21 +02:00
Michael DeHaan
5e2c2564bc
Explicitly execute /bin/sh versus $SHELL because some folks have very incompatible/weird shells. We do not
...
execute modules through the shell, this is only for basic ops, so should be sufficient.
2012-10-25 23:00:07 -04:00
Michael DeHaan
ff787146d1
stray debug
2012-10-25 22:24:15 -04:00
Michael DeHaan
24416b9e49
Remove stray debug message
2012-10-25 22:19:50 -04:00
Michael DeHaan
3257c5b61f
Some caching improvements to paramiko which are still not yet fully leveraged
...
in playbook mode, since the Runner still closes abstract host connections completely
and does not have a LRU.
2012-10-25 22:09:54 -04:00
Michael DeHaan
4c83c274e0
Don't close paramiko SFTP multiple times in the same runner pass. Noticeable performance increase.
2012-10-25 21:49:28 -04:00
Michael DeHaan
3c6d9972fe
clarify message about name of configuration parameter
2012-10-21 07:12:06 -04:00
Michael DeHaan
a69e59ab2b
Allows delegate_to to use inventory host/port info.
2012-10-16 20:57:37 -04:00
Michael DeHaan
04954dbc1e
Makes ports configurable for fireball. Note port defaults really belong in the connection plugins, not runner, which can be refactored later.
2012-10-08 19:03:37 -04:00
Ralph Bean
d25ee940c4
Close zeromq context and socket.
2012-09-28 08:22:53 -04:00
Aleksej Romanov
0db5ccfecb
Don't use ssh-agent if password is specified.
2012-09-27 14:57:06 +07:00
Michael DeHaan
69612ba16d
The very first start of 'fireball mode', which uses ansible in SSH mode to deploy a ephemeral zeromq daemon (entirely optional) that is will die after
...
it is no longer used. No key signing will be required. At this point, development use only -- NOT complete.
2012-09-26 23:51:59 -04:00
Michael DeHaan
6fb1884a03
Add __init__'s to git
2012-09-06 18:43:28 -04:00
Michael DeHaan
3de4e45741
Move plugin directories
2012-08-21 20:32:21 -04:00