Thanks a lot Jon !! It worked for me ....... On Thursday, October 10, 2019 at 11:24:19 AM UTC+5:30, J Hawkesworth wrote: > > Have a read of this... > > https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html#why-can-i-run-a-command-locally-that-does-not-work-under-ansible > Is it possible the installer is expecting a GUI? Sometimes installers > have a 'silent' or 'unattended' mode that means they can be made to run > without GUI so worth seeing if that is an option. > Running via 'become' instead of via psexec might be worth trying too. > > I hope this helps, > > Jon > > > On Wednesday, October 9, 2019 at 2:02:18 PM UTC+1, Karl Auer wrote: >> >> Dunno about it now throwing an error, but that space is not in the input >> either, i.e., it is not in the command as you provided it here. And why >> would it not be in the output? Ansible doesn't randomly remove bits of >> output. Might be worth double-checking... >> >> Regards, K. >> >> >> On Wed, Oct 9, 2019 at 11:50 PM Manish Kumar <[email protected]> >> wrote: >> >>> yes space is there but in output it is not visible . Also It does not >>> throw any error . >>> >>> On Wednesday, October 9, 2019 at 6:19:12 PM UTC+5:30, Karl Auer wrote: >>>> >>>> Is there supposed to be a space after "-f1" or "-f2"? It does look like >>>> there should be one, but that's just a wild guess. >>>> >>>> Regards, K. >>>> >>>> >>>> On Wed, Oct 9, 2019 at 10:49 PM Manish Kumar <[email protected]> >>>> wrote: >>>> >>>>> Dear All, >>>>> >>>>> Below task gets completed while running it manually from window dos >>>>> however nothing happens while we execute it using ansible playbook and >>>>> there is no error as well. >>>>> >>>>> How to debug such issue and get it working ? >>>>> >>>>> Play-book1: >>>>> --- >>>>> - name: install Disribution Server >>>>> gather_facts: false >>>>> hosts: win >>>>> >>>>> tasks: >>>>> - name: Install services >>>>> win_psexec: >>>>> command: >>>>> D:\Software_InstallationSets\NT_Service_Installset\RepSrv\SETUP.EXE -s >>>>> -f1D:\Software_InstallationSets\NT_Service_Installset\RepSrv\Repsrv.iss >>>>> -f2D:\ArisGlobal\Components\RepSrv_Iss.log >>>>> >>>>> Play-book2: >>>>> --- >>>>> - name: install Disribution Server >>>>> gather_facts: false >>>>> hosts: win >>>>> >>>>> tasks: >>>>> - name: Install services >>>>> win_command: >>>>> D:\Software_InstallationSets\NT_Service_Installset\RepSrv\SETUP.EXE -s >>>>> -f1D:\Software_InstallationSets\NT_Service_Installset\RepSrv\Repsrv.iss >>>>> -f2D:\ArisGlobal\Components\RepSrv_Iss.log >>>>> >>>>> >>>>> Output: >>>>> >>>>> Host# ansible-playbook -i inventory.yml install.yml -vvv >>>>> >>>>> [WARNING] Ansible is in a world writable directory >>>>> (/U01/automation/playbooks), ignoring it as an ansible.cfg source. >>>>> >>>>> ansible-playbook 2.4.6.0 >>>>> >>>>> config file = /etc/ansible/ansible.cfg >>>>> >>>>> configured module search path = >>>>> [u'/home/tsadmin/.ansible/plugins/modules', >>>>> u'/usr/share/ansible/plugins/modules'] >>>>> >>>>> ansible python module location = >>>>> /usr/lib/python2.7/site-packages/ansible >>>>> >>>>> executable location = /usr/bin/ansible-playbook >>>>> >>>>> python version = 2.7.16 (default, Jul 19 2019, 23:05:17) [GCC 7.3.1 >>>>> 20180712 (Red Hat 7.3.1-6)] >>>>> >>>>> Using /etc/ansible/ansible.cfg as config file >>>>> >>>>> Parsed /U01/automation/playbooks/inventory.yml inventory source with >>>>> ini plugin >>>>> >>>>> >>>>> >>>>> PLAYBOOK: install.yml >>>>> ********************************************************** >>>>> >>>>> 1 plays in install.yml >>>>> >>>>> >>>>> >>>>> PLAY [install Disribution Server] >>>>> ********************************************** >>>>> >>>>> META: ran handlers >>>>> >>>>> >>>>> >>>>> TASK [Install services] >>>>> ******************************************************** >>>>> >>>>> task path: /U01/automation/playbooks/install.yml:7 >>>>> >>>>> Using module file >>>>> /usr/lib/python2.7/site-packages/ansible/modules/windows/win_psexec.ps1 >>>>> >>>>> <192.140.6.17> ESTABLISH WINRM CONNECTION FOR USER: admin on PORT 5986 >>>>> TO 192.140.6.17 >>>>> >>>>> EXEC (via pipeline wrapper) >>>>> >>>>> changed: [192.140.6.17] => { >>>>> >>>>> "changed": true, >>>>> >>>>> "delta": "0:00:00.453119", >>>>> >>>>> "end": "2019-10-09 11:31:36.914910", >>>>> >>>>> "failed": false, >>>>> >>>>> "psexec_command": "psexec.exe -accepteula >>>>> D:\\Software_InstallationSets\\NT_Service_Installset\\RepSrv\\SETUP.EXE >>>>> -s >>>>> -f1D:\\Software_InstallationSets\\NT_Service_Installset\\RepSrv\\Repsrv.iss >>>>> >>>>> -f2D:\\ArisGlobal\\Components\\RepSrv_Iss.log", >>>>> >>>>> "rc": 0, >>>>> >>>>> "start": "2019-10-09 11:31:36.461791", >>>>> >>>>> "stderr": >>>>> "D:\\Software_InstallationSets\\NT_Service_Installset\\RepSrv\\SETUP.EXE >>>>> exited with error code 0.\r\n", >>>>> >>>>> "stderr_lines": [ >>>>> >>>>> >>>>> >>>>> "D:\\Software_InstallationSets\\NT_Service_Installset\\RepSrv\\SETUP.EXE >>>>> exited with error code 0." >>>>> >>>>> ], >>>>> >>>>> "stdout": "\r\nPsExec v2.2 - Execute processes >>>>> remotely\r\nCopyright (C) 2001-2016 Mark Russinovich\r\nSysinternals - >>>>> www.sysinternals.com\r\n\r\n <http://www.sysinternals.com/r/n/r/n>", >>>>> >>>>> "stdout_lines": [ >>>>> >>>>> "", >>>>> >>>>> "PsExec v2.2 - Execute processes remotely", >>>>> >>>>> "Copyright (C) 2001-2016 Mark Russinovich", >>>>> >>>>> "Sysinternals - www.sysinternals.com", >>>>> >>>>> "" >>>>> >>>>> ] >>>>> >>>>> } >>>>> >>>>> META: ran handlers >>>>> >>>>> META: ran handlers >>>>> >>>>> >>>>> >>>>> PLAY RECAP >>>>> ********************************************************************* >>>>> >>>>> 192.140.6.17 : ok=1 changed=1 unreachable=0 >>>>> failed=0 >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Manish >>>>> >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ansible Project" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/ansible-project/059d6d3d-3afe-4f33-a5bb-7e52358e0223%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/ansible-project/059d6d3d-3afe-4f33-a5bb-7e52358e0223%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> >>>> >>>> -- >>>> >>>> *Karl Auer* { manager, systems support } >>>> P: 1300 759 975 >>>> E: [email protected] >>>> 2pisoftware.com >>>> >>>> GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E >>>> Previous: 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/8d5288a4-15f4-4477-a5a9-888f8488ab98%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/ansible-project/8d5288a4-15f4-4477-a5a9-888f8488ab98%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> >> *Karl Auer* { manager, systems support } >> P: 1300 759 975 >> E: [email protected] >> 2pisoftware.com >> >> GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E >> Previous: 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 >> >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/96377e62-259b-41da-80be-2166e1156fd8%40googlegroups.com.
