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.