Re: [ansible-project] get windows-path and execute command

2024-01-28 Thread jbor...@gmail.com
This will be because you are using the full result from win_shell which includes things like changed, rc, stdout, stderr, etc. You need to do `- win_shell: "{{ pingpath.stdout |trim }} 9.9.9.9" and say you want to use the stdout value of the result which contains the full path. The | trim is

[ansible-project] Re: trying to debug ansible and win_package

2024-01-12 Thread jbor...@gmail.com
The only time this error ever appears is if you have a timeout set on the task [1]. Check to ensure you don't have that config entry set 'ansible-config dump --only-changed' or haven't set it on the task play. [1]

Re: [ansible-project] AD Module

2024-01-03 Thread jbor...@gmail.com
> That of course assumes that the ActiveDirectory powershell module is available on Linux. It isn't, it's a Windows only component that cannot be installed independently. What OP wants to do with the microsoft.ad.x modules cannot be done outside of a Windows target host. They would have to

[ansible-project] Re: Custom modules that can run on both Linux and Windows

2023-08-23 Thread jbor...@gmail.com
Theoretically this is all possible but there are a few things that are impediments to getting this all working. - Python modules can technically run on Windows but our general module_utils (basic.py) use libraries that are - PowerShell modules can technically run on non-Windows but a

Re: [ansible-project] Re: Privilege escalation by rsa key

2023-08-20 Thread jbor...@gmail.com
uce the > issue, i am using ansible 2.14. The only change between working and not > working is setting a dummy password. I started with using the ssh args > which did not work. > > On Sun, Aug 20, 2023, 4:08 PM jbor...@gmail.com wrote: > >> > ansible wants a pa

Re: [ansible-project] Re: Privilege escalation by rsa key

2023-08-20 Thread jbor...@gmail.com
re if the > ansible team is planning to address this or not. > > On Sun, Aug 20, 2023, 5:35 AM jbor...@gmail.com wrote: > >> You can control what arguments Ansible uses to invoke the ssh binary >> with. See ssh_extra_args [1] for ways to set extra arguments. You can run &

Re: [ansible-project] Re: Privilege escalation by rsa key

2023-08-20 Thread jbor...@gmail.com
You can control what arguments Ansible uses to invoke the ssh binary with. See ssh_extra_args [1] for ways to set extra arguments. You can run Ansible with -vvv and it will show you the full ssh command being run on each connection. [1]

Re: [ansible-project] WSL1 localhost

2023-07-05 Thread jbor...@gmail.com
Sure you can run powershell.exe directly with raw/shell/command as the executable but as I mentioned the localhost on WSL refers to the Linux host. The only way to run the Windows PowerShell modules is to target the host through winrm/psrp so the remote host is on the Windows side. On

[ansible-project] Re: Unable to use python 3

2023-06-29 Thread jbor...@gmail.com
The Ansible engine side only runs on the python that it was installed in, which in your case is 2.7.5. The ansible_python_interpreter controls what Python is used to run the modules on the remote target. You can see what Python was invoked for that scenario by running Ansible with -vvv. If you

Re: [ansible-project] WSL1 localhost

2023-06-28 Thread jbor...@gmail.com
Localhost on the WSL side is the WSL Linux host itself and not the Windows one. Unfortunately you still need to target your Windows localhost using the winrm or psrp connection type. Thanks Jordan On Thursday, June 29, 2023 at 1:50:54 AM UTC+10 John Petro wrote: > If I am reading the output

Re: [ansible-project] Ssh connectivity issues from a Debian core server to a remote Windows 10 Pro host.

2023-06-28 Thread jbor...@gmail.com
Literally set `ansible_shell_type=powershell` for your Windows hosts. It's what's in the docs you were linked to. On Thursday, June 29, 2023 at 1:40:51 AM UTC+10 gonzalo diaz larenas wrote: > I already did the generation of the public key, then I copied it to the > host that has Windows Pro, I

Re: [ansible-project] Ssh connectivity issues from a Debian core server to a remote Windows 10 Pro host.

2023-06-26 Thread jbor...@gmail.com
Based on your screenshot you didn't define ansible_shell_type for the Windows hosts as per the guide. This is crucial for getting ssh to work with Windows as it must match the remote shell that's being used, in your case that's powershell. On Monday, June 26, 2023 at 11:06:35 PM UTC+10 gonzalo

[ansible-project] Re: ansible 2.9 et NT AUTHORITY\SYSTEM - bad ?

2023-05-25 Thread jbor...@gmail.com
2.3 - 2.9 was a fairly rapid time when it came to become on windows. IIRC 2.8 introduced password less become functionality which added more stringent checks onto the SYSTEM token that was used in the process. One of these checks was to see if the token had the SeTcbPrivilege associated with

[ansible-project] Re: Issue running get-aduser in powershell from playbook

2023-05-02 Thread jbor...@gmail.com
This is most likely the double hop problem where the WinRM process on the Windows side is unable to authenticate itself when talking to a downstream server [1] There are a few ways you can solve this - Use become on the task [2] - Use CredSSP as your authentication protocol with WinRM

Re: [ansible-project] Re: Windows Batch File via Ansible - ERROR: Input redirection is not supported

2023-04-19 Thread jbor...@gmail.com
Try just doing - win_command: '{{ install_app_download_dir }}\Prerequisites\install_rabbitmq.bat'. You could also prefix that command with cmd.exe /c path\to\install.bat and see if it helps. Another option is to use '- win_shell: exit (Start-Process -FilePath ... -Wait -PassThru).ExitCode' to

[ansible-project] Re: credssp: ('Connection aborted.'; ConnectionResetError(104; 'Connection reset by peer')

2023-01-23 Thread jbor...@gmail.com
Most likely there is no common cipher support between the Ansible host and the remote Windows host. Server 2008 is quite old and only supports a very limited set of cipher suites. This is an issue because newer hosts and OpenSSL they ship with now define a more retrictive set of protocols and

[ansible-project] Re: win_package how can it know package has been installed when product_id is not specified

2022-12-22 Thread jbor...@gmail.com
If it's an msi, the module can scan the package itself to get the product_id. If it's an exe then it would need the product_id or one of the creates_* options to try and add some idempotency. On Friday, December 23, 2022 at 12:24:04 PM UTC+10 pyyg...@gmail.com wrote: > Hi everyone, > > About

[ansible-project] Re: using domain user account for ansible_user on inventory

2022-12-06 Thread jbor...@gmail.com
The problem here is that it's using Basic auth for the authentication which only works for local accounts. You either need to setup Kerberos auth or use ntlm. Both can be specified with ansible_winrm_transport (ntlm or kerberos). On Wednesday, December 7, 2022 at 2:31:20 AM UTC+10

[ansible-project] Re: Windows Become Confusion

2022-10-16 Thread jbor...@gmail.com
e script.ps1 or win_shell as above? >- Why did failure of the PS script not fail the win_shell task? > > Thank you and have a great day. > On Wednesday, October 12, 2022 at 10:28:06 PM UTC-5 jbor...@gmail.com > wrote: > >> To truly replicate the behaviour of running it inte

[ansible-project] Re: Windows Become Confusion

2022-10-12 Thread jbor...@gmail.com
To truly replicate the behaviour of running it interatively (or at least as close as you can get) you need to specify a password for become. - win_shell: ... become: true become_method: runas vars: ansible_become_user: '{{ ansible_user }}' ansible_become_pass: '{{ ansible_password

[ansible-project] Re: executing community.windows integration tests?

2022-10-09 Thread jbor...@gmail.com
The community.windows tests require the ansible.windows, and chocolatey.chocolatey to be installed as per the requirements https://github.com/ansible-collections/community.windows/blob/main/tests/requirements.yml. Unfortunately it is very particular as to where the collection actually is

Re: [ansible-project] Re: WinRM kerberos- HTTPSConnectionPool

2022-10-09 Thread jbor...@gmail.com
So to verify the host is actually listening run 'winrm e winrm/config/listener' you should see if there is an actual listener for HTTPS/5986. You can also use your favourite command to check if the port is reachable, e.g. 'nc -zvw10 192.168.1.2 5986'. Once you've verified that you can actually

[ansible-project] Re: WinRM kerberos- HTTPSConnectionPool

2022-10-06 Thread jbor...@gmail.com
For the connection timed out either means the server is not listening on that port (5986) or a firewall is in the way. The bad handshake might mean the server doesn't support a TLS protocol or cipher suite the client supports. On older Windows hosts (pre 2016) there is a limited set of cipher

Re: [ansible-project] Re: Error- When Condition

2022-08-15 Thread jbor...@gmail.com
That's not true, I do it all the time. The raw yaml value needs to be quoted but you still need to quote the inner string value to make sure it's interpreted as a string, e.g. when: '"RUNNING" in job_check.stdout_lines' On Tuesday, August 16, 2022 at 6:20:02 AM UTC+10 walte...@nist.gov wrote:

Re: [ansible-project] Problem with WinRM Connections

2022-06-13 Thread jbor...@gmail.com
Have a look at the warning Ansible is giving you, it is telling you it was unable to use your configured remote target value and forced `inventory_hostname`. Solve that and you will probably solve this problem. On Tuesday, June 14, 2022 at 4:30:08 AM UTC+10 indiem...@gmail.com wrote: > I could

[ansible-project] Re: Quotes inside URI header

2022-02-21 Thread jbor...@gmail.com
lue must look like this: > > "headers": { > > "Authorization": "Token token="1234" " > } > > > El Monday, February 21, 2022 a la(s) 6:21:54 PM UTC-6, jbor...@gmail.com > escribió: > >> > When I attempt to do i

Re: [ansible-project] How to Ansible copy force overwrite

2022-02-21 Thread jbor...@gmail.com
The problem here is you are telling it to copy the file to the location E:\OtomasyonFiles\WINDOWSISO\win2019 which is a folder. Add a trailing \ to the dest or use the full path to where you want the file to be ('E:\OtomasyonFiles\WINDOWSISO\win2019\autounattend.xml') so it knows to place the

[ansible-project] Re: Quotes inside URI header

2022-02-21 Thread jbor...@gmail.com
> When I attempt to do it, the quotes are being parsed into JSON and the token is enclosed by backslashes. Why do you believe this is the case, if it's due to the backslashes appearing in the task output that's just due to the output being encoded as json. The literal value is what that json

Re: [ansible-project] Add Windows-Control Node support

2022-01-26 Thread jbor...@gmail.com
It's definitely not so simple, there are numerous complexities around the worker model used in Ansible and it is heavily reliant on `fork()` to provide some features that improve the performance. The use of `fork()` wasn't chosen to annoy Windows users by not being supported there but how the

Re: [ansible-project] Re: Can I modify Ansible 'remote_tmp' on a per task basis?

2022-01-19 Thread jbor...@gmail.com
You can, just need to set the var to ansible_remote_tmp, see the var entry for it https://docs.ansible.com/ansible/latest/collections/ansible/builtin/sh_shell.html#parameter-remote_tmp. On Wednesday, January 19, 2022 at 3:26:51 AM UTC+10 chris.mcd...@sbcglobal.net wrote: > Roberto, > > Sorry,

Re: [ansible-project] CS Falcon Windows Install Issue

2021-12-08 Thread jbor...@gmail.com
The error indicates you are using too Ansible 2.9 with the ansible.windows collection. The collection in question only supports 2.10 or newer due to it's dependency on functionality that was introduced in 2.10 or later. On Saturday, December 4, 2021 at 9:07:21 AM UTC+10 dick@geant.org wrote:

Re: [ansible-project] Ansible Playbook for Windows Patching

2021-11-10 Thread jbor...@gmail.com
Have a look at the output of win_updates, it will tell you what updates were selected and the ones that were not. The ones that are "filtered" (not selected) will have a reason which states why they were filtered out. If the update doesn't appear in the output at all then Windows couldn't find

[ansible-project] Re: win_dns_record credentials

2021-11-08 Thread jbor...@gmail.com
My comment in that issue still applies you have a play that looks somewhat like the following - name: my play hosts: my-win-hosts gather_facts: yes # If omitted the default is yes, will always run unless you set this as no tasks: - name: Create A record

[ansible-project] Re: DependsOn and ansible.windows.win_dsc

2021-08-22 Thread jbor...@gmail.com
You cannot. Each win_dsc task is an adhoc implementation of a DSC resource and they have no idea about other DSC tasks you may have invoked. Ansible tasks are run sequentially so running 2 DSC tasks after each other will ensure both are run and the 2nd is dependent on the first. If you wish to

Re: [ansible-project] Run exe file with spaces in the filename using Win Command

2021-08-22 Thread jbor...@gmail.com
If the path to the executable has a space you need to quote it, unfortunately yaml makes that a bit more difficult as whatever quote you start the value on you also need to end with that quote. There are 2 solutions I recommend to you: * Wrap the whole value in a single quote and use an inner

[ansible-project] Re: become with runas method not work on some of my machines

2021-08-16 Thread jbor...@gmail.com
The error represents ERROR_LOGON_FAILURE which according to https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d means > Logon failure: Unknown user name or bad password. You will want to be 100% sure you have the correct username/password

Re: [ansible-project] Is there an Ansible Windows module to configure certificates similar to MMC.exe service?

2021-08-16 Thread jbor...@gmail.com
https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_certificate_store_module.html On Friday, August 13, 2021 at 11:04:59 AM UTC+10 zil...@gmail.com wrote: > Here's the manual procedure i'm trying to automate. Thanks > > >1. > >In Windows, click Start > Run. >

[ansible-project] Re: Ansible win_file can not create a directory on a partitioned drive?

2021-06-22 Thread jbor...@gmail.com
You have a typo, it's 'state' not 'status'. The default value is 'state: file' and due to historical behaviour 'state: file' will not create the file. On Tuesday, June 22, 2021 at 11:35:04 AM UTC+10 zil...@gmail.com wrote: > Ansible 2.11.0 > > I created an I: disk partition on my Windows 2019

[ansible-project] Re: Installation of LinPhone (.exe) in Windows environments.

2021-05-20 Thread jbor...@gmail.com
When you use win_package on a file that isn't an .msi you need to provide the unique product_id so the module can do it's idempotency checks. Typically this is a GUID value as stored in the registry but it may be any other string the executable sets there's really no common format for .exe

Re: [ansible-project] Re: win_file removing root directory when deleting files older than 30 days

2021-05-12 Thread jbor...@gmail.com
You are looking win_file with the values of FilesOver30.files but setting the path for each of those loops to unc_path. This will just run the same thing, deleting that UNC path for every loop iteration. What you want to do is set 'path: "{{ item.path }}"' so that path is set to each of the

[ansible-project] Re: temporary file "AnsiballZ_setup.py" having syntax error #49757

2021-05-11 Thread jbor...@gmail.com
Your Python version is too old, the managed node requires Python 2.7 or 3.5 or newer https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements. On Wednesday, May 12, 2021 at 4:54:54 AM UTC+10 riz...@gmail.com wrote: > Having the same issue as:

[ansible-project] Re: Failed to get token for NT AUTHORITY\SYSTEM required for become as a service account or an account without a password

2021-04-19 Thread jbor...@gmail.com
it need to get as an Administrator again? > > > > On Monday, April 19, 2021 at 12:55:04 PM UTC+1 jbor...@gmail.com wrote: > >> There isn't unfortunately, your security team should hopefully be aware >> that this doesn't prevent Mimikatz attacks just makes it slightly harder. >

[ansible-project] Re: Failed to get token for NT AUTHORITY\SYSTEM required for become as a service account or an account without a password

2021-04-19 Thread jbor...@gmail.com
> still same error. > > On Thursday, April 15, 2021 at 10:53:17 PM UTC+1 jbor...@gmail.com wrote: > >> The primary reason for not being able to get the SYSTEM token (required >> for passwordless become on Windows) is your connection user doesn't have >> the SeDebugPr

[ansible-project] Re: Windows Playbook how to not have a remote connection for every task

2021-04-15 Thread jbor...@gmail.com
sed that while reading, honestly I mostly skip > down to the usage. > I did not think about using the UNC path and yes, I will be able to > utilize the same account for both servers thank goodness. > > On Thursday, April 15, 2021 at 4:45:22 PM UTC-5 jbor...@gmail.com wrote: > >> E

[ansible-project] Re: Failed to get token for NT AUTHORITY\SYSTEM required for become as a service account or an account without a password

2021-04-15 Thread jbor...@gmail.com
The primary reason for not being able to get the SYSTEM token (required for passwordless become on Windows) is your connection user doesn't have the SeDebugPrivilege. This should be assigned to Admins users by default but sometimes custom environment settings remove this privilege. You can use

[ansible-project] Re: Windows Playbook how to not have a remote connection for every task

2021-04-15 Thread jbor...@gmail.com
Each task is run in it's own shell, you cannot map a drive and expect to be able to use it in an Ansible task. It even says it in the documentation for win_mapped_drive https://docs.ansible.com/ansible/latest/collections/community/windows/win_mapped_drive_module.html > You cannot use this

Re: [ansible-project] Re: Changing ansible_shell_type - is ansible reusing ssh connection?

2021-03-29 Thread jbor...@gmail.com
to thank you, I was reading your > excelelnt article on Windows Mapped drives the other day. > Still some testing to do on that but I may have a question there. If so > shall I put it on this list? > > On Mon, 29 Mar 2021 at 00:12, jbor...@gmail.com wrote: > >> The way t

[ansible-project] Re: Changing ansible_shell_type - is ansible reusing ssh connection?

2021-03-28 Thread jbor...@gmail.com
The way to reset the connection in Ansible is to run - meta: reset_connection This will delete the existing control persist socket so the subsequent task will use a new connection. On Saturday, March 27, 2021 at 10:36:26 AM UTC+10 needabettername wrote: > My explanation in the first message

[ansible-project] Re: ERROR! this task 'ansible.windows.win_command' has extra params

2021-03-18 Thread jbor...@gmail.com
You are using Ansible 2.9 and the ansible.windows collections does not work with this Ansible version (requires 2.10). This is one of the reasons why the minimum version for that collection is 2.10. Thanks Jordan On Friday, March 19, 2021 at 1:12:31 AM UTC+10 jayantya...@gmail.com wrote: >

Re: [ansible-project] [ HELP ] Ansible Module Error [ Parameter format not correct - >nul\r\n ]

2021-03-02 Thread jbor...@gmail.com
>> "changed": false, >> "module_stderr": "Parameter format not correct - >\r\n", >> "module_stdout": "", >> "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", >> "

Re: [ansible-project] [ HELP ] Ansible Module Error [ Parameter format not correct - >nul\r\n ]

2021-02-28 Thread jbor...@gmail.com
The error is literally trying to run a syntax that works for cmd.exe but in PowerShell hence the error 'Parameter format not correct - >nul'. The fix for this is to either set ansible_shell_type=powershell or change the default shell back to CMD on your Win32 OpenSSH config. If you've already

Re: [ansible-project] Not able to copy backup files between 2 remote windows server

2021-02-21 Thread jbor...@gmail.com
Your dest should have 2 backslashes at the start, right now it's being treated as a local path. Even with a UNC path you are most likely going to hit the double hop problem with delegating your credentials. Make sure you use Kerberos with credential delegation, CredSSP, or use become on the

Re: [ansible-project] How to Run program as an administrator

2021-02-18 Thread jbor...@gmail.com
Any Windows module supports become, it's implementation is completely independent from modules themselves. In the majority of situations a module is run as Administrator but there are a few cases where that may not apply. To test it out run - win_whoami: You can also run it with become to

Re: [ansible-project] Re: exec_wrapper hangs

2021-02-04 Thread jbor...@gmail.com
n_shell starts) > > Den tors 4 feb. 2021 kl 13:02 skrev jbor...@gmail.com : > >> I think the more important question here is what are your win_shell >> commands actually running. If it's spawning another process then that could >> be taking control of the conhost

[ansible-project] Re: exec_wrapper hangs

2021-02-04 Thread jbor...@gmail.com
I think the more important question here is what are your win_shell commands actually running. If it's spawning another process then that could be taking control of the conhost used by WinRM keeping the Ansible wrapper process still running in the backround. Otherwise if you are just running

[ansible-project] Re: Powershell Function via Ansible | Get-AnsibleParam: Missing required argument: _raw_params

2021-02-02 Thread jbor...@gmail.com
include_tasks >> >> The error appears to be in >> '/etc/ansible/playbooks/shares/greenfield/greenfield_share_create.yml': >> line 294, column 5, but may >> be elsewhere in the file depending on the exact syntax problem. >> >> The offending line appears to be: >

Re: [ansible-project] [WARNING]: - linux-system-roles.network was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/':

2021-02-01 Thread jbor...@gmail.com
How do you expect to download a role from the internet if you don't have access to the internet in the first place. An offline flag would only work if you've already downloaded the roles and placed it somewhere, if that's the case then just copy it into the roles directory like normal roles.

Re: [ansible-project] SQL Server 2019 Installation Failing

2021-02-01 Thread jbor...@gmail.com
You are ignoring errors on your win_command task that is actually installing SQL so when you go to configure the service it is failing because it isn't installed. You should only ignore_errors if you truely don't care if it fails or not, if it is failing then you need to solve that problem

[ansible-project] Re: Powershell Function via Ansible | Get-AnsibleParam: Missing required argument: _raw_params

2021-02-01 Thread jbor...@gmail.com
- Test play > > > # > > - name: test me > ansible.windows.win_shell: > args: > cmd: echo 'hi' > > Results > > fatal: [SERVER.DOMAIN.net]: FAILED! => { > > "changed": false, > "msg": "Get-AnsibleParam: Missing re

[ansible-project] Re: How do I install .NET Framework 4 SDK?

2021-02-01 Thread jbor...@gmail.com
This doesn't really sound like an Ansible question, dotnet build is complaining it can't find the assembly and that's just what Ansible is reporting. YOu need to figure out the correct install steps first then you can do the same with an Ansible task. On Monday, February 1, 2021 at 6:36:50 PM

[ansible-project] Re: Creating symbolic links in Windows with mklink always returns changed

2021-02-01 Thread jbor...@gmail.com
The reason why it always reports a change is because win_command/win_shell always reports a change, it doesn't know what command it is running and whether it is making a change or not. You have 2 ways to solve this: - Add the creates arg to win_command that tells it to run the command

[ansible-project] Re: Ansible authentication with windows by using GoDaddy or third party certificates

2021-01-28 Thread jbor...@gmail.com
WinRM certificate auth require certain extensions and authentication methods to be enabled, you can't just use a server authentication certificate that you would use for a website for this. We even document how to create these certs using PowerShell or OpenSSL

[ansible-project] Re: Powershell Function via Ansible | Get-AnsibleParam: Missing required argument: _raw_params

2021-01-28 Thread jbor...@gmail.com
What Ansible version are you running, does it also fail with the same error if you did just "- ansible.windows.win_shell: echo 'hi'". Does win_command work, what about just "win_shell" and not the FQCN. On Friday, January 29, 2021 at 2:58:30 AM UTC+10 jesse...@gmail.com wrote: > Crickets > :(

Re: [ansible-project] win_service_info register

2021-01-24 Thread jbor...@gmail.com
Just loop the services entry and then your item is item.name. - win_service: name: '{{ item.name }}' state: started with_items: '{{ service.services }}' This works because service.services is a list that contains a dictionary so you are looping each entry and then getting the name key

Re: [ansible-project] Windows module error with ansible.legacy.setup PowerShell -NoProfile -NonInteractive?

2021-01-12 Thread jbor...@gmail.com
If your default shell is PowerShell you need to tell Ansible that with 'ansible_shell_type=powershell'. Right now it's using cmd hence the cmd syntax which isn't valid in PowerShell. On Tuesday, January 12, 2021 at 12:53:05 PM UTC+10 ryan...@gmail.com wrote: > I'm aware that using SSH with

[ansible-project] Re: Upgrade To Windows 20H2

2020-11-02 Thread jbor...@gmail.com
Not through the win_updates module [1] and I doubt it will be added at any point in the future due to the lack of a public API. What you need to do is source the update file yourself and use either win_command or win_package to manually install it. [1] -

[ansible-project] Re: Ansible not installing msi through shared drive

2020-11-02 Thread jbor...@gmail.com
A few things - Each task is run in a completely separate shell from each other, running net use in a previous task won't have any affect on any subsequent tasks - Don't try to use mapped drives with Ansible, or really any other non-interactive purpose - Mapped drives are

[ansible-project] Re: does control box need access to domain controller

2020-11-02 Thread jbor...@gmail.com
If you want to use Kerberos then yes you need to be able to contact the DC. That's part of the Kerberos protocol and nothing can change that. On Friday, October 30, 2020 at 9:19:39 AM UTC+10 vel...@gmail.com wrote: > I have a ansible control box and have configured it to manage windows >

[ansible-project] Re: Pinging Windows Host Now Returns Unexpected Error

2020-10-28 Thread jbor...@gmail.com
You need to use win_ping and not ping. It's trying to run Python code in a PowerShell engine which fails. On Thursday, October 29, 2020 at 11:50:28 AM UTC+10 dwiz wrote: > This is verbose output: > > ansible 2.9.11 > config file = /etc/ansible/ansible.cfg > configured module search path =

[ansible-project] Re: Windows machine not pinging.

2020-10-09 Thread jbor...@gmail.com
The ping and win_ping modules aren't doing an ICMP ping, they are checking to see if Ansible can connect to the host and execute a very basic module. In your case it's able to connect to the host but it's enable to authenticate using the credentials you have specified. See

[ansible-project] Re: Trying to use Packer Provisioner for Ansible, Winrm connections to Windows 2019 server

2020-09-28 Thread jbor...@gmail.com
There is an error when trying to execute PowerShell causing the process to stop and subsequently close the stdin pipe that Ansible is writing to. Can you run with a higher verbosity so that Ansible shows the full stdout and stderr from the process (-vv). That will output the full error

[ansible-project] Re: windows custom facts help

2020-09-18 Thread jbor...@gmail.com
possible to make it look like this like it does >> on Linux (adding the filename and the [title] block)?: >> >> "ansible_local": { >> * "local": {* >> *"local_facts": {* >> "ami_id": "ami-0701e7be9

[ansible-project] Re: windows custom facts help

2020-09-17 Thread jbor...@gmail.com
A further FYI, do not include the | ConvertTo-Json part, just output the hashtable or array directory, the issue has been updated with more information as to why that is. On Thursday, September 17, 2020 at 9:01:23 PM UTC+10 jbor...@gmail.com wrote: > Just an FYI there may be a

[ansible-project] Re: windows custom facts help

2020-09-17 Thread jbor...@gmail.com
to do as well. On Thursday, September 17, 2020 at 8:50:48 PM UTC+10 jbor...@gmail.com wrote: > Just try it out and see for yourself. I have placed the following script > at C:\Windows\TEMP\facts\my_facts.ps1 with the contents > > @{ > my_custom_fact = 'value' > my_c

[ansible-project] Re: windows custom facts help

2020-09-17 Thread jbor...@gmail.com
Just try it out and see for yourself. I have placed the following script at C:\Windows\TEMP\facts\my_facts.ps1 with the contents @{ my_custom_fact = 'value' my_complex_custom_fact = @{ hello = 'world' } } | ConvertTo-Json -Compress This script converts a PowerShell hashtable

[ansible-project] Re: Help using Win_Copy Module From Windows Host To Windows Host

2020-09-14 Thread jbor...@gmail.com
mand?. > > Which in my case my ansible host is a Linux mint machine. > > Again thank you for your response and taking the time out to reply and > help! > > On Monday, September 14, 2020 at 9:29:06 PM UTC+1 jbor...@gmail.com wrote: > >> You've set the become vars but

[ansible-project] Re: Help using Win_Copy Module From Windows Host To Windows Host

2020-09-14 Thread jbor...@gmail.com
You've set the become vars but you haven't actually turned on become, have a read through https://docs.ansible.com/ansible/latest/user_guide/become.html#become-flags-for-windows especially the "copy a file from a fileshare with custom credentials" example. If you are trying to copy a file

Re: [ansible-project] Re: How to install Ansible on a windows 2012 R server

2020-08-31 Thread jbor...@gmail.com
You cannot really do that. The only option would be to run it in something like WSL but even then there are caveats. You should be using a Linux host to run the Ansible control node. On Thursday, August 27, 2020 at 8:16:04 PM UTC+10 surabhy...@gmail.com wrote: > I want to install ansible

[ansible-project] Re: ERROR! A worker was found in a dead state

2020-08-31 Thread jbor...@gmail.com
Looks like you are running on macOS based on the paths in your ansible-playbook --version output. There is a known problem with running Ansible on macOS [1] where certain system calls on the forked Ansible process cause the process to get killed by the kernel. This is a pretty fundamental

[ansible-project] Re: Updating Windows 10

2020-08-03 Thread jbor...@gmail.com
service reserves the /wsman URL prefix. To prevent conflicts with IIS, > administrators should ensure that any websites hosted on IIS do not use the > /wsman URL prefix.", > "desktop_interact": false, > "display_name": "Windows Remote Management (WS-Management)", > "exists": true, > "name": "WinRM

[ansible-project] Re: Updating Windows 10

2020-07-29 Thread jbor...@gmail.com
I still don't fully see the issue, the first call to win_updates found 4 updates and no updates were filtered. The screenshot you shared show that 4 updates were available which matches the 4 that are in log. Based on the logs it was run in check mode so it didn't actually install the updates

[ansible-project] Re: Powershell script works locally on windows machine but fails when attempted to run via playbook.

2020-07-29 Thread jbor...@gmail.com
null.", "At line:4 > char:20", "+ Stop-Service -Name $serviceName", "+ > ", "+ CategoryInfo : InvalidData: (:) > [Stop-Service], ParameterBindin ", " gValidationException", "+

[ansible-project] Re: Kerberos authentication failed on windows

2020-07-28 Thread jbor...@gmail.com
"unreachable": true} > > hmmm.. I believe credentials should be read from host file! I am not sure > why it's not reading. > > Thanks, > Work Hard > > > On Monday, July 27, 2020 at 8:53:48 PM UTC-7, jbor...@gmail.com wrote: >> >> You need to share the

[ansible-project] Re: Kerberos authentication failed on windows

2020-07-27 Thread jbor...@gmail.com
You need to share the error you are getting back, right now we cannot tell what is going wrong. On Tuesday, July 28, 2020 at 8:32:50 AM UTC+10 workema...@gmail.com wrote: > Hello, > Kerberos authentication is failing on some servers even after providing > credentials in host file. > > *Host

[ansible-project] Re: Powershell script works locally on windows machine but fails when attempted to run via playbook.

2020-07-27 Thread jbor...@gmail.com
So breaking down your error message you get the following PowerShell error(s) FINDSTR: Bad command line Stop-Service : Cannot find any service with service name 'ColdFusion 9 - '. At C:\Users\Administrator\Documents\servicerestart.ps1:7 char:1 + Stop-Service -Name "ColdFusion 9 -

[ansible-project] Re: host file doesn't read variable for windows

2020-07-23 Thread jbor...@gmail.com
1. You have a typo when you specify kerberos auth, it should be 'ansible_winrm_transport' but you have 'anisble_winrm_transport' 2. validate_certs: false doesn't affect WinRM cert validation, that's just a standard var 3. You shouldn't have to set

[ansible-project] Re: Integrating Microsoft LAPS and ansible

2020-07-13 Thread jbor...@gmail.com
Theres the laps_password https://docs.ansible.com/ansible/latest/plugins/lookup/laps_password.html lookup that you can use to retrieve a password set by LAPS from AD. Unfortunately it requires a few extra bits to be installed on your host like OpenLDAP but it's definitely possible. On