My first guess is case of administrator. In your task, you have the first letter capitalized. In your inventory file, it is lowercase.
On Tuesday, November 13, 2018 at 5:42:30 AM UTC-5, [email protected] wrote: > > 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/b9bd0232-db52-4644-a9d4-c680a866e3e8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
