Commit Graph

17825 Commits

Author SHA1 Message Date
3511e2dfeb Expanding unit tests for module_utils/basic.py 2016-03-21 15:10:03 -04:00
6fe0865fe0 Cleaning up tests which don't apply to 2.0 2016-03-21 15:06:35 -04:00
f18dac0d39 Properly use check_raw when using parse_kv in cli/ code
Fixes ansible-modules-core#3070
2016-03-21 13:14:36 -04:00
4705f22d37 Fixing role param precedence issues
* Make role param resolution follow the role dependency chain, rather
  than using all roles within the play
* Also move params to be merged in after role vars in general, to match
  our variable precedence rules
* Changes to the way var lookup is done in role helper methods for
  get_vars(), get_inherited_vars(), and get_role_params() to make the
  above possible without trampling on previously merged vars

Fixes #14472
Fixes #14475
2016-03-21 13:14:03 -04:00
9d9c0dfa69 Add missing to_bytes for cmd. 2016-03-21 13:13:53 -04:00
9d46a16f3f Renaming per-item and retry callbacks 2016-03-21 13:13:04 -04:00
587baea811 use just 'remote_user' as user for the docker connection 2016-03-21 13:09:56 -04:00
cfae3aae5f use remote_user or become_user in docker connection 2016-03-21 13:09:52 -04:00
f6aca77ebd strip keys recursively 2016-03-21 13:09:05 -04:00
f620a52555 Add changes necessary for enabling pipelining for local connections 2016-03-21 13:09:01 -04:00
819610e797 Enable pipelining for jail connection plugin 2016-03-21 13:08:56 -04:00
dcd751a767 Small cleanup to use class attribute directly instead of property for transport names 2016-03-21 13:08:52 -04:00
14e164d1db Fix saving of tracebacks on module failure 2016-03-21 13:08:40 -04:00
61afb71c09 Allow FieldAttribute lists and sets to be set from a comma separated string 2016-03-21 13:08:28 -04:00
7ddce864a1 Add missing to_bytes on directory path. 2016-03-21 13:08:12 -04:00
07abd05e38 Reorganizing tox stuff and making py3-specific requirements 2016-03-21 13:06:53 -04:00
f921306b9c Send empty command before recv
On some switches, starting an SSH connection and immediately calling
recv() will result in a connection timeout. The switch requires some
input on the channel before it provides any prompt.

As such, this patch sends an empty command immediately upon connection,
triggering the switch to send a prompt which the shell can then
interpret.

Signed-off-by: Devananda van der Veen <devananda.vdv@gmail.com>
2016-03-21 13:06:30 -04:00
9402ed1aff Fixing template/assemble action plugins related to tmp dir use/cleanup 2016-03-21 13:06:19 -04:00
2b64c9b8aa Fix unicode handling in connection plugins. 2016-03-21 13:04:14 -04:00
96e6a9dca7 Don't always insert failed in the results (again) 2016-03-21 13:03:58 -04:00
0f9dd9a74e Fix ssh connection plugin to work with python3 2016-03-21 13:03:27 -04:00
ed570c682f Fixing PlayIterator bugs
* Unit tests exposed a problem where nested blocks did not correctly
  hit rescue/always portions of parent blocks
* Cleaned up logic in PlayIterator
* Unfortunately fixing the above exposed a potential problem in the
  block integration tests, where a failure in an "always" section may
  always lead to a failed state and the termination of execution
  beyond that point, so certain parts of the block integration test
  were disabled.
2016-03-21 13:03:18 -04:00
6f8dbdd547 Fixing minor logic error in error detection/handling in ssh connection plugin
If max retries were reached, no AnsibleConnectionFailure was raised, which
means potentially in some cases an unreachable error might not be returned
2016-03-21 13:03:10 -04:00
3ba54becd8 Fix redirects for get_url
* fetch_url shouldn't both accept follow_redirects and support follow_redircts via module.params
* Default follow_redirects for open_url should be 'urllib2'
* Add redirect test for get_url
2016-03-21 13:02:39 -04:00
2e18411543 Updating unit tests for PlayIterator
This knowingly introduces a broken test, planning to fix that later.
2016-03-21 13:01:35 -04:00
5c04a090e2 Make it easier to read error message 2016-03-21 13:00:18 -04:00
d30c3b282b clarified message 2016-03-21 12:59:57 -04:00
45d070ba3a reject extraneous data passed to mode
strictly permissions are allowed, file type info should not be passed in
alternate fixes #14771
2016-03-21 12:59:53 -04:00
c4dfa888d1 Use to_bytes on filenames in filesystem calls. 2016-03-21 12:59:44 -04:00
f4c27ef80a remove main_q for simplicity.
main_q is not used anywhere in the codebase.

It is created in TaskQueueManager._initialize_processes, bundled with rslt_q
into TaskQueueManger._workers, later unwrapped in StrategyBase but not used.
This queue is closed in TaskQueueManger._cleanup_processes.

Historically, it is passed as a init parameter into WorkerProcess,
introduced in 62d7956, but this behavior is changed in 120b9a7.

Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
2016-03-21 12:59:37 -04:00
e562fe608f Remember to use errors=strict since this is looking up a filename on the filesystem (ie it has to match exactly) 2016-03-21 12:59:28 -04:00
f07ff69bd3 Make the source path into a byte string before passing to os.path 2016-03-21 12:59:23 -04:00
89cc762970 Make sure test script fails on any error 2016-03-21 12:58:42 -04:00
79e165dd5f better task parsing errors
fixes #14790
2016-03-21 12:58:38 -04:00
df1ee5a15b fix issues with older yaml lib versions
also added missing json import and removed unused ones
2016-03-21 12:58:33 -04:00
2fdcaa218f Pulling in travis.yml from devel 2016-03-21 12:58:12 -04:00
1e2bf19dbe fixed str to to_str 2016-03-21 12:57:08 -04:00
9f1fede968 more complete and informative errors
mostly templating issues now all return data templated and actual error
fixes #14781
2016-03-21 12:57:03 -04:00
de0e9e34b7 tweak deprecation warnings display 2016-03-21 12:56:58 -04:00
3ffb7027ad Transform pathnames to bytes before passing on to os.path functions 2016-03-21 12:56:53 -04:00
068e322610 Support SSL validation with redirect control for python versions without ssl context 2016-03-21 12:56:47 -04:00
6ef188eec5 Remove debugging and fix the place where bytes are being handed to StringIO 2016-03-21 12:55:46 -04:00
1d94e0f63b more information 2016-03-21 12:55:42 -04:00
ca41dbb603 Testing whether this fixes jenkins 2016-03-21 12:55:37 -04:00
6ad5c0f4f6 Conditionally import StringIO in template so we only use io.StringIO on py3 2016-03-21 12:55:32 -04:00
435924f3de Fixing bug in setup related to StringIO fixes 2016-03-21 12:55:28 -04:00
d5801d76e8 Changing location of reduce import to not use six.moves 2016-03-21 12:55:23 -04:00
e36834bd52 Adding py3 stub for reduce from six.moves 2016-03-21 12:55:17 -04:00
d0656f948d Fix bug 14715: Galaxy CLI paging error 2016-03-21 12:54:40 -04:00
a74e97fa31 don't lock file when calculating checksum 2016-03-21 12:54:35 -04:00