[ansible-devel] Re: Switch to Disable Powershell Base64 encoding - WinRM/win_shell

2021-01-24 Thread Jordan Borean
Hi There is no plans or action to remove this, using '-EncodedCommand' is a valid argument in PowerShell and is used to avoid dealing with quote escaping hell when it comes to embedded quotes inside the actual script as well as newlines. If you are concerned about not knowing what those

[ansible-devel] Re: Will Ansible work in case of Windows Jump Server?

2019-11-18 Thread Jordan Borean
Unfortunately no, WinRM doesn't support any bastion options. The psrp connection plugin does offer a proxy option which you can potentially use for a SOCKS proxy as a bastion host but that requires SSH and for you to set that up before hand. Thanks Jordan -- You received this message

[ansible-devel] Re: Who triggers the wrapper script generation on a Windows node ?

2019-08-18 Thread Jordan Borean
complex_args is actually a hashtable where the key is the module option and the value is the raw value for that option. You might be confusing the ArrayList with the generic list we use to store variable definitions, that include complex_args, that are passed to the module_wrapper process.

[ansible-devel] Re: Who triggers the wrapper script generation on a Windows node ?

2019-08-16 Thread Jordan Borean
Yep that's correct, the exec_command function doesn't no or care about what it is executing, it just has the command to run passed in as cmd and option input data to send over the stdin pipe. It's up to the caller of exec_command to make sure the command that it wants to run accepts input data

[ansible-devel] Re: error when running a windows command using 'raw'

2019-08-16 Thread Jordan Borean
That’s my bad, when you quote the string and want to execute it you need to add the call operator like: - raw: ‘&” C:\Program Files\... “‘ The alternative is to use win_command with the setup you have right now. -- You received this message because you are subscribed to the Google Groups

[ansible-devel] Re: Who triggers the wrapper script generation on a Windows node ?

2019-08-15 Thread Jordan Borean
Hi This particular script is part of the put_file operation for winrm [1] which is executed like "PowerShell.exe -EncodedCommand ScriptB64". Part of the put_file method is to read the bytes of the file to transfer across and send it over the stdin pipe of the process under the WSMan Send

[ansible-devel] Re: error when running a windows command using 'raw'

2019-08-15 Thread Jordan Borean
Actually if your example is literal and -a is on a newline then that's probably your issue, it sounds like you wanted '>' not '|' to folder each newline in your string but I still recommend the way above I posted. -- You received this message because you are subscribed to the Google Groups

[ansible-devel] Re: error when running a windows command using 'raw'

2019-08-15 Thread Jordan Borean
Not sure why it is complaining here, maybe an invisble control character. Anyway you are best off doing the following; - name: Installing the license raw: '"C:\Program Files\IBM\SQLLIB\BIN\db2licm" -a "{{ temp_area }}\{{ db2_lic_file }}"' Raw in Windows is not truly raw as it is run in a

[ansible-devel] ansible-collection commands

2019-07-09 Thread Jordan Borean
Hi The Ansible team has recently introduced collections in Ansible 2.8 and as part of our ongoing development we have been working on creating a way to build, publish, and install collections using the ansible-galaxy command. We have recently merged the first iteration of this work with

[ansible-devel] winrm send_input failed. help needed.

2019-07-03 Thread Jordan Borean
You can’t use Python modules on a Windows host, use win_file and not file. Thanks Jordan -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[ansible-devel] Re: Cannot import module from ~/.ansible/plugins/module_utils

2019-06-27 Thread Jordan Borean
Action plugins can reference ansible.module_utils but only for ones in the base Ansible package. Module can take advantage of the lookup path as it is built for you automatically and sent across to the remote host. Feel free to raise a PR to the Ansible docs at

[ansible-devel] Re: How to pass ansible variables to powershell cmdlet using win_shell module

2019-06-20 Thread Jordan Borean
Your set_fact task is setting 'lookup('dig', inventory_hostname)' as a literal string, you will to use braces so it actually interprets the lookup, e.g. - set_fact: target_ip: '{{ lookup("dig", inventory_hostname) }}' In the future you are better off posting in the Ansible Project mailing

[ansible-devel] Re: Ansible over SSH on Windows host type progress status needed

2019-05-20 Thread Jordan Borean
These question are better suited towards the Ansible Project mailing list at https://groups.google.com/forum/#!forum/ansible-project. Ansible Development is for development questions inside Ansible, such as modules, plugins and so on and not general help. Using ssh does not mean you can start

[ansible-devel] Ansible over SSH on Windows host type progress status needed

2019-04-06 Thread Jordan Borean
Not sure what you mean by WinRMs lack of security requirements, if you use RDP in your org then WinRM is no worse than that. In saying that, SSH support for Windows has been added for 2.8 with https://github.com/ansible/ansible/pull/47732. It’s experimental and the interface can change in the

[ansible-devel] Re: win_command with become still doesn't seem to work

2019-02-14 Thread Jordan Borean
I found some time to play around with this a bit more. It turns out the initial installer spawns multiple processes and doesn't actually wait until it is finished. This causes the parent WinRM process to close it's shell which has the side affect of killing any children it spawns. It's weird

[ansible-devel] Re: win_command with become still doesn't seem to work

2019-02-13 Thread Jordan Borean
Just a few things to note, you don't need to set the task directory become, become_method, become_user if you have set the vars as well. Variable > than task directives when it comes to precedence. If the initial exe is then starting up another executable and exits immediately it makes sense

[ansible-devel] Re: Jenkin Jobs are failing because it is not able to access the mapped n/w drive

2018-11-12 Thread Jordan Borean
You won't be able to access a mapped drive within an Ansible task or any other non-interactive logons in Windows. There is a fundamental security barrier between how WinRM processes or scheduled task jobs are started and where mapped drives are accessible to the user. Thanks Jordan -- You

Re: [ansible-devel] Does Ansible expose `ansible_become_pass` to modules?

2018-10-04 Thread Jordan Borean
No ansible_become_pass is not accessible from a module. Only the module options set in the task yaml and a few key internal variables are passed in, like check mode, diff, verbosity. Thanks Jordan -- You received this message because you are subscribed to the Google Groups "Ansible

Re: [ansible-devel] Ansible Tower Windows SSH Support

2018-09-04 Thread Jordan Borean
We've looked into it and it needs a few changes in Ansible for it to be properly implemented. In saying that, the Win32-OpenSSH fork from MS still has some warts and is still a beta product and contains a few bugs and quirks that makes it less appealing. Honestly you should be pushing back on

Re: [ansible-devel] Optimizing Ansible and its WinRM use for speed and profit

2018-03-24 Thread Jordan Borean
Looking at persisted connections/shells is definitely something we want to look at and because 2.6 is going to be a stabilization release from the core team 2.7 is where we will start looking into it. WinRM has 2 components that make it really slow compared to SSH; * The network latency and

[ansible-devel] Re: Diskpart for Windows

2018-03-20 Thread Jordan Borean
Hi If you want to use diskpart I believe you need to put each command as a line in a text file and then call the diskpart exe and reference that text file. This isn't really ideal and you should probably look at the newer PowerShell cmdlets to do what you want. I found this is a good place to

[ansible-devel] Re: ANSIBALLZ_WRAPPER is not recognized as the name \r\nof a cmdlet

2018-02-28 Thread Jordan Borean
No worries, when you run the windows-integration tests it will load the inventory file I mentioned. You can't use Python modules on Windows hosts as it will either fail with a send input error or the one you see with ANSIBALLZ. Glad you got it working though, good luck with the testing.

[ansible-devel] Re: Where is the webdocs file?

2017-11-28 Thread Jordan Borean
If you want to just generate the docs for just a single module you can run MODULES=file make webdocs This will generate the docs for the file module as well as the rest of the rst docs. This will save a lot of time as you don't need to generate the docs for every single module. Thanks

[ansible-devel] Re: Windows Server 2016 and scheduled tasks

2017-11-08 Thread Jordan Borean
>From my understanding non-Administrators cannot create/modify/remove/view Scheduled tasks by default. Each task itself is governed by the NTFS security ACL of the XML definition file located in C:\Windows\System32\Tasks\*.xml, here are the default permissions set when creating a task.

[ansible-devel] Powershell V2 deprecated soon

2017-07-24 Thread Jordan Borean
This should affect Ansible, there is a minimum requirement for Powershell V3 or newer and this can be met on all supported versions of Windows. -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop

[ansible-devel] Re: win_template or win_copy Ansible 2.3 Windows 2008R2 - possible bug.

2017-05-31 Thread Jordan Borean
Your output seems to indicate you are still using 2.2 and not 2.3. Are you able to verify your Ansible versions by running ansible --version and share your playbook so we can try and replicate it? -- You received this message because you are subscribed to the Google Groups "Ansible

[ansible-devel] Re: debugging modules on ansible => 2.3.0

2017-04-26 Thread Jordan Borean
2.3 removed this unfortunately with the way the execution wrapper now works. I believe Matt was looking at reverting the behavior to what it was before when ANSIBLE_KEEP_REMOTE_FILE is set to true but I'm not sure where he is at with that. Unfortunately this means in the meantime I'm stuck with

[ansible-devel] Re: debugging modules on ansible => 2.3.0

2017-04-26 Thread Jordan Borean
2.3 removed this unfortunately with the way the execution wrapper now works. I believe Matt was looking at reverting to the older executor to allow this debugging to work but not sure where he is up to. I've had to either use Fail-Json statements everywhere and try and debug that way (not

[ansible-devel] Calling other Powershell Module

2016-10-29 Thread Jordan Borean
Hi I was wondering if there was functionality to call another powershell module from another similar to how the find module calls the stat module to get file information. I am in the middle of building a win_find module and having this ability will help to reduce the amount of code I need to