Commit Graph

4464 Commits (0ef4e0372b36e9141d338c80c8a8637a45c5d005)

Author SHA1 Message Date
Chris Church 0ef4e0372b Fixes for WinRM/PowerShell support in v2.
- Add support for inserting module args into PowerShell modules.  Fixes #11661.
- Support Windows paths containing spaces.  Applies changes from #10727 to v2.  Fixes #9999.  Should also fix ansible/ansible-modules-core#944 and ansible/ansible-modules-core#1007.
- Change how execution policy is set for running remote scripts.  Applies changes from #11092 to v2.  Also fixes ansible/ansible-modules-core#1776.
- Use codepage 65001 (UTF-8) for WinRM connection instead of default (CP437), convert command to UTF-8 and results from UTF-8.  Replaces changes from #10024.  Fixes #11198.
- Close WinRM connection when task completes.
- Use win_stat, win_file and win_copy modules instead of stat, file and copy when called from within other action plugins (only when using WinRM+PowerShell).
- Unquote Windows path arguments before passing to win_stat, win_file, win_copy and slurp modules (only when using WinRM/PowerShell).
- Check for win_ping module to determine if core modules are missing (only when using WinRM/PowerShell).
- Add stdout_lines to result from running low level commands (so stdout_lines is available when using raw/script).
- Update copy action plugin to use shell functions for joining paths and checking for trailing slash.
- Update fetch action plugin to unquote source path when using Windows paths.
- Add win_copy and win_template action plugins that inherit from copy and template.
- Support running .bat and .cmd scripts using default system encoding instead of UTF-8.
- Always send PowerShell commands as base64-encoded blobs to allow for running simple PowerShell commands via raw.
- Support running modules on Windows with interpreters other than PowerShell.
- Update integration tests to support above changes and test unicode fixes.
- Add test for win_user error from ansible/ansible-modules-core#1241 (fixed by ansible/ansible-modules-core#1774).
- Add test for additional win_stat output values (implemented by ansible/ansible-modules-core#1473).
- Add test for OS architecture and name from setup.ps1 (implemented by ansible/ansible-modules-core#1100).

All WinRM integration tests pass for me with these changes.
11 years ago
James Cammarata 0fcd53e887 Make sure the command is sudoable before checking for the become password
Fixes #11714
11 years ago
James Cammarata e526743b4f Allowing `args: "{{some_var}}"` for task params again
This is unsafe and we debated re-adding it to the v2/2.0 codebase,
however it is a common-enough feature that we will simply mark it
as deprecated for now and remove it at some point in the future.

Fixes #11718
11 years ago
Brian Coca 681eab1158 fix adhoc that broke with assuming step is always in options 11 years ago
Brian Coca 88e1ef8c9b implemented --step in v2 11 years ago
Brian Coca 3bf1edfd96 Merge pull request #11591 from defionscode/boto3
Connection function for boto3
11 years ago
James Cammarata 7bc789ba64 Properly template task names
Also fixes in the correct way the bug in which the role name was
incorrectly showing up twice in the task name.

Fixes #10347
11 years ago
James Cammarata 698479a623 Add config file info to --version output
Fixes #10348
11 years ago
James Cammarata 37ed756d66 Make sure role names are strings
Fixes #10497
11 years ago
Toshio Kuratomi f8e4aff4c1 Cleanups:
* Don't reference __class__ when we can use the instance itself
* use isdisjoint() as it can stop once a match is found
* Remove a condtional that was taken care of in the conditonal just above
11 years ago
Brian Coca 4e3f5e3be6 Merge pull request #11708 from bcoca/display_me
adding display to plugins and start moving debug to display
11 years ago
Brian Coca 78df37db8a updated submodule refs 11 years ago
Brian Coca a6ba149c49 implemented simplified output for adhoc adn command modules as in v1 11 years ago
James Cammarata 65ae9780fa Merge pull request #11079 from amegianeg/fix_broad_except_in_inventory
Avoid too broad except in Inventory
11 years ago
Toshio Kuratomi e7733a7d3a Update submodule refs 11 years ago
Brian Coca 851ed45bbf adding display to plugins and start moving debug to display 11 years ago
Toshio Kuratomi b06353791c Don't pass mode from synchronize action plugin to the ansible module
Fixes https://github.com/ansible/ansible-modules-core/issues/1783
11 years ago
Brian Coca b678b9828c simplified and normalized lookup search path behaviour 11 years ago
James Cammarata 857f584ebf Merge pull request #11699 from ahamilton55/ah/delegate_variable
v2: Fixing delegate_to when using a variable
11 years ago
Brian Coca b9050ecf18 fixed file lookup pathing in dwim functinos, now does specific paths and priorities and is commented
fixes #11672 as cwd is now not part of thos paths:
if full path is supplied, used that
11 years ago
Andrew Hamilton 7254b22bf4 Fixing delegate_to when using a variable 11 years ago
James Cammarata d412bc72ef Fall back to paramiko if the smart detection fails to run ssh
Fixes #11695
11 years ago
James Cammarata dfcf6a2016 Skip hosts with no state while iterating tasks in the linear strategy
Fixes #11693
11 years ago
James Cammarata 206ef27268 Add flag to template() so data is not converted to a datastructure
Fixes #11641
11 years ago
James Cammarata 7a9916422a Fixing up error handling for fetch_file ops in connection plugins
* enable batch mode (configurable with a config option, on by default)
  for sftp transfers, so we can catch errors more easily
* general cleanup in the local connection plugin and fetch action plugin

Fixes #11612
11 years ago
James Cammarata 4b6525fb58 Fix handler flushing to match how v1 worked
Also adds meta tasks to the list of tasks excluded from tag filtering

Fixes #11574
11 years ago
Toshio Kuratomi d0dcf73716 Update module refs 11 years ago
James Cammarata 135404738e Fix a couple start-at-task issues
* added pattern matching to match v1 functionality
* check the task name, not the task+role name for matches
* make sure the input is unicode

Fixes #11692
11 years ago
James Cammarata 975172c1ef Make sure role name doesn't end up in task name more than once
Fixes #11691
11 years ago
James Cammarata b09f1f8e0b Account for filters in bare variable conversion
Fixes #11530
11 years ago
Jeff Widman 52716c4dc7 Remove mention of 'apache example'
Removed explicit mention of 'apache'
11 years ago
ZviRackover 628925a77d Fix: add missing import 'locale' 11 years ago
James Cammarata 4c733fe4b7 Fix issues with vars_prompt and vars_files
* Prompt had to be moved up, as it needed to be done before the first
  templating of the play occurs, otherwise vars_files won't be templated
  properly
* Fixed a bug related to an earlier fix of vars_files incorporating
  extra vars to do the templating of the file name

Fixes #11404
11 years ago
Toshio Kuratomi 491a4f2a25 Update extras module pointer for docs fix 11 years ago
James Cammarata adf1d4d9b9 Submodule pointer update 11 years ago
James Cammarata 66a8864ae9 Fix environment setting and inheritence
Fixes #11401
11 years ago
James Cammarata 91519d1696 Don't filter include tasks based on tags
Fixes #11320
11 years ago
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
11 years ago
Brian Coca 827b0443c8 now dataloader checkis that you get at least a valid string as a file name 11 years ago
James Cammarata 7124504ccf Incorporate extra vars when templating vars_files
Fixes #11377
11 years ago
James Cammarata b8b206005c Generalize extra variable parsing and loading
Fixes #11352
11 years ago
James Cammarata 3de6f264dd Fix bug where spaces in the $HOME directory broke things
Fixes #11332
11 years ago
James Cammarata 91a4b866b0 Fix ssh pipelining 11 years ago
Toshio Kuratomi ddec06ccfe Detect the old python-json library
Fixes #11654
11 years ago
James Cammarata 5347db2952 Also check the play basedir for the role
Fixes #11328
11 years ago
James Cammarata dca36c1d16 Reestablishing the use of tags/when for role duplication detection
Not figuring these in can cause problems with "diamond" pattern relationships,
even though this is still not quite optimal.
11 years ago
Toshio Kuratomi a0a6d12b05 Merge pull request #11603 from ansible/get_url-tls-compat
Have openssl autonegotiate tls protocol on python < 2.7.9
11 years ago
Brian Coca 03d7c8d7ca fixed new HPUX networking facts 11 years ago
Brian Coca 80eb7a20ca Merge pull request #11469 from pilou-/local_variable
Fix pyflakes error: use 'msg' variable
11 years ago
Brian Coca 91f2acb029 Merge pull request #10203 from pdelared/devel
Add HP-UX network facts
11 years ago