Commit graph

7 commits

Author SHA1 Message Date
Matt Davis
97f97339f7
re-enable batch tests for win_script ()
* skipped on Server 2008 since batch interpreter is busted under UTF8 codepage
* see https://github.com/ansible/ansible/issues/21915 for more details
2018-11-16 11:23:53 -08:00
Jordan Borean
d81249994e
win_script: add support for become and centralise exec wrapper builder ()
* win_script: add support for become and centralise exec wrapper builder

* satisfying the pep8 gods

* do not scan for module dependencies when running as a script
2018-09-13 08:50:13 +10:00
Matt Clay
8ea0bfe9a3
Miscellaneous test fixes. ()
* Add missing pylint test for invalid path.
* Fix syntax in integration test.
* Use Write-Output in win_script test script.
* Fix pylint in explain mode.
2018-01-24 10:22:04 -08:00
Sam Doran
ea3638b580 Add proper check mode support to the script module ()
* Do not run script in check mode

Fixes 

* Reformat script integration test

* Add integration tests for check mode of script module

* Fix name on test

* Cleanup temp file

* win_script integration test syntaxt changes

* Add check mode tests for win_script

* Use proper variable in test

* Fail if source file does not exist

* Verify script is accessible and don't copy in check mode

Use shlex to properly split shell arguments, though a path with spaces in it still needs to be quoted in the playbook.
Add note to docs describing such.
Improve error message if file is not found indicating there may be a space in the path.

* Properly encode path now that path is split using shlex

* Allow for spaces in both path and script name

* Add unicode character test to Linux script tests

* Add Linux test for space in path to script
2017-11-13 15:33:44 -08:00
Matt Davis
73f50b4f9f fix Windows env handling ()
* fixes 
* fixes 
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
2017-03-23 17:48:15 -07:00
Matt Davis
8527013fbe Complete rewrite of Windows exec wrapper ()
* supports pipelining for faster execution
* supports become (runas), creates interactive subsession under WinRM batch logon
* supports usage of arbitrary module_utils files
* modular exec wrapper payload supports easier extension
* integrates async wrapper behavior for pipelined/become'd async
* module_utils are loaded as true Powershell modules, no more runtime modifications to module code
2017-02-17 00:09:56 -08:00
Matt Clay
c2ec86cb78 Migrate Windows CI roles to test targets. () 2016-10-13 18:03:19 +01:00