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]
[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] *************************************************************************************************************************************************
TASK [Install my seup.exe file.] *********************************************************************************************************************************
Can some one please help me on this.
Thanks