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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
>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.
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
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
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
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
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
29 matches
Mail list logo