Commit Graph

797 Commits (982c9394b2a4fdcb81793ce8d217d2fe5673befe)

Author SHA1 Message Date
jeromew e4a3f49fa2 ssh_alt - only trigger 'fatal' when returncode == 255 (interpreted as 'could no connect') 2013-12-17 11:42:00 -05:00
jeromew 5c965a75f0 ssh_alt.py / decrease # of ssh roundtrips 2013-12-13 14:23:40 -05:00
Jesse Keating 8cef210aea Make sure ssh pipes are empty before moving on
Resolves issue #5082

Code as it was would hit a scenario where one of the FDs was not ready for
reading the first time through -- but p.poll() would show the process as
complete. This would cause ansible to continue on, while leaving some content
left in a pipe.

The other scenario -- the one that causes the unclosed quote, is if we go
through select.select() and we do get stdout in the ready for reading -- we
read from it (9000 bytes), but that's not all that is there. Again we'd get to
the p.poll() check and it would be indeed not none, but we would have left some
of stdout on the FD and thus the json blob would be malformed.

Tested with and without full ssh debugging.
Tested with and without ControlPersist
Tested with and without ControlPersist sockets already created
2013-12-11 21:32:37 -08:00
Michael DeHaan 929f8a5c93 Had to revert commits due to async. 2013-12-10 19:24:08 -05:00
Michael DeHaan 74e4ccb59b Revert "ssh_alt.py / decrease # of ssh roundtrips"
This reverts commit 7f8863f96d.
2013-12-10 19:23:52 -05:00
jeromew 7f8863f96d ssh_alt.py / decrease # of ssh roundtrips 2013-12-10 06:00:21 -05:00
jeromew db182ba498 copy ssh.py to ssh_alt.py 2013-12-09 14:11:29 -05:00
Steve Smith 5b81f88c8f Cast the retrieved `retries` var to an int before incrementing as it may be in string form.
For example, the following method of calculating the value will result in a type error:

    appstatus_waitfor: 4  # Minutes
    appstatus_delay: 5 # seconds
    appstatus_retries: "{{ mins * 60 / delay }}"
2013-12-07 10:35:14 +01:00
jctanner 7aa35d64c2 Merge pull request #5091 from EspadaV8/5089_assemble_fix
#5089 hack-fix assemble module
2013-12-04 10:13:16 -08:00
Matt Martz 5f0f3566a6 Skipped only has 2 p's not 3 2013-12-03 15:42:34 -06:00
James Tanner d227614529 Fixes #5109 synchronize module ssh port
Added a parameter for dest_port and also check ansible_ssh_port inventory variable.
2013-12-03 14:48:20 -05:00
Andrew Smith eed32ea70c dest_contents isn’t always defined, so don’t pass it around
I think this is also a bit of a hack since it should probably be set
before being used, I’m just not sure what it should be set to.
2013-11-28 10:59:51 +10:00
Andrew Smith e2d03173d2 The file module doesn’t have it’s module_args reset
I believe that this should be reset in the same way that the copy module
does
2013-11-28 10:58:14 +10:00
Andrew Smith 7b01c83159 Passing in complex_args throws ‘unsupported parameter for module’ errors
When using assemble only params (e.g. remote_src) the copy (and I’m
guessing file) modules throw an error that the param isn’t supported.
Simply removing the complex_args param fixes it for me, but I’m not sure
that’s the correct thing to do
2013-11-28 10:55:35 +10:00
Andrew Smith da44a7f0cb I think that resultant is meant to be the contents of the combined file
It is used for the transfer and as a diff param but isn’t actually
defined anywhere before it’s used. This seemed like the least bad place
to set it.
2013-11-28 10:53:00 +10:00
Andrew Smith 4503413baa ReturnData is used throughout but not actually imported 2013-11-28 10:51:04 +10:00
Andrew Smith 7d007cac16 Correct the invocation of ‘_assemble_from_fragments’ 2013-11-28 09:44:14 +10:00
jctanner 920bc6e75b Merge pull request #5086 from j2sol/fix-accelerate_inventory
Avoid a traceback when using accelerate
2013-11-27 14:46:12 -08:00
James Tanner b6879ca2bd Fixes #5030 compare connection user and sudo user and disable sudo if identical 2013-11-27 17:01:53 -05:00
Jesse Keating 5522d489e3 Avoid a traceback when using accelerate
This bit of code is attempting to access accelerate_inventory_host,
which may not have been set/created. This will cause a traceback.
Instead use getattr with a fallback to False.
2013-11-27 13:58:11 -08:00
James Tanner 12ed39ef7b Fixes #5056 Append new hosts to the groups cache 2013-11-27 13:04:31 -05:00
Brian Coca 65885feeeb fixed typo for assemble function 2013-11-26 08:30:28 -05:00
James Tanner b8146e3bc7 Fixes #4979 Check for the correct context when inside the inventory_hostnames plugin 2013-11-25 10:57:10 -05:00
James Tanner 903c4cae7b Fixes #5031 Template the delay value and cast to float for loops 2013-11-25 10:13:55 -05:00
James Tanner bca2634d54 Fix missing eval for string search in ssh controlpersist 2013-11-22 12:22:53 -05:00
James Tanner a16fe923ed Addresses #5011 check for proper string in smartos ssh error output 2013-11-22 12:13:24 -05:00
jctanner 5c84d7e445 Merge pull request #5002 from ovcharenko/devel
Allow to specify ansible_ssh_private_key_file location related to user home directory
2013-11-22 06:39:07 -08:00
James Tanner 512ebdb971 Revert "Merge pull request #5001 from ovcharenko/devel"
This reverts commit d6c3103a00, reversing
changes made to b11f96eaa4.
2013-11-22 00:09:37 -05:00
Aleksey Ovcharenko 9af44b1b42 Update to 4 space indent 2013-11-22 04:20:14 +02:00
Aleksey Ovcharenko 30678e04ac Make tests happy 2013-11-22 04:06:10 +02:00
Aleksey Ovcharenko 2222f6df58 Allow to specify ansible_ssh_private_key_file location related to user home directory 2013-11-22 01:47:03 +02:00
James Tanner b815a09529 Fix pep8 error in password lookup 2013-11-19 16:36:18 -05:00
James Tanner e81c976636 Fix pep8 errors in unarchive module 2013-11-19 16:35:06 -05:00
jctanner 68afd9da9f Merge pull request #4866 from sergevanginderachter/known_hosts_sudo
Check real user's known_hosts when sudo ansible...
2013-11-19 12:13:24 -08:00
Brian Coca 34c33f7ea1 now correctly spell symmetric
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 14:48:11 -05:00
Brian Coca 460bbfaec1 added union filter
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 14:40:55 -05:00
Brian Coca afe30a6633 added difference and symetric difference filters
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-11-19 00:06:38 -05:00
Matt Haggard 389602b8dd Merge pull request #4920 from iffy/ansible
Collect all stdout over ssh transport before returning data
2013-11-18 15:09:21 -05:00
Skylar Saveland 7bc64581d7 KeyError: 'delegate_to' no more 2013-11-17 21:26:17 -08:00
jctanner 04847191b4 Merge pull request #4879 from bcoca/unique_intersect
added unique and intersect filters for dealing with lists
2013-11-14 12:46:50 -08:00
jctanner 77affdefbc Merge pull request #4585 from mscherer/connec_func
connection plugin to reuse the func/certmaster interface instead of ssh
2013-11-14 08:15:17 -08:00
jctanner be67a6f815 Merge pull request #4625 from pileofrogs/devel
unarchive module & action plugin
2013-11-14 07:57:57 -08:00
James Tanner 33242cacf3 Merge pull request #4375 from pfalcon/ansible
copy: Implement recursive copying if src is a directory.
2013-11-13 15:52:40 -05:00
jctanner 6dd81f25d9 Merge pull request #4856 from akuznecov/devel
Resolves #4855 issue with synchronize module failing on multiple items
2013-11-12 15:37:26 -08:00
James Tanner f31cb7c6e8 Merge pull request #4664 from jpmens/ansible
Lookup plugin for etcd

with support for configurable etcd URL in ansible.cfg (and environment)
2013-11-12 15:29:05 -05:00
jctanner 2cf335969f Merge pull request #4738 from bcoca/assemble_action_plugin
assemble can now use src from master/origin
2013-11-12 08:23:39 -08:00
Brian Coca efd87534eb added unique and intersect filters for dealing with lists
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
2013-11-12 10:34:57 -05:00
James Tanner 6e49ee6cfc Remove commented code block 2013-11-11 14:44:13 -05:00
James Tanner 288c33e286 Merge pull request #4078 from mkaluza/ansible
add 'chars' parameter to password plugin to allow custom character set
2013-11-11 14:30:49 -05:00
Serge van Ginderachter 80fd22dce6 Check real user's known_hosts when sudo ansible...
closes #4834
2013-11-09 13:29:39 +01:00