Hi Team,
I want to open command prompt as runas administrator to install my
setup.exe file in windows.
below is my playbook.
[Setup_install.yml]
---
- hosts: windows
user: testuser
tasks:
- name: Install my seup.exe file.
win_command: 'C:\temp\setup.exe /SP /VERYSILENT /DIR=C:/temp
/LOG=C:/temp/Install.log'
become: yes
become_method: runas
become_user: Administrator
below is my inventory file.
[windows]
server1.domain.com
[windows:vars]
ansible_ssh_user=testuser
ansible_ssh_pass=xxxxxxx
ansible_ssh_port=5986
ansible_connection=winrm
ansible_winrm_scheme=https
ansible_winrm_server_cert_validation=ignore
ansible_winrm_transport=ntlm
ansible_become_user=administrator
ansible_become_pass=xxxxxxx
When i execute setup_install.yml file, below is the output and its not
completing the task.
PLAY [windows]
*********************************************************************************************************************************************************
TASK [Gathering Facts]
*************************************************************************************************************************************************
ok: [server1.domain.com]
TASK [Install my seup.exe file.]
*********************************************************************************************************************************
Can some one please help me on this.
Thanks
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e45a7219-afc0-41ce-99b6-baa80847477f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.