# unable to install applications after downloading in VM using ansible

**URL:** <https://forum.ansible.com/t/unable-to-install-applications-after-downloading-in-vm-using-ansible/33584>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 11, 2020, 11:28am UTC](https://forum.ansible.com/t/unable-to-install-applications-after-downloading-in-vm-using-ansible/33584 "2020-08-11T11:28:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahmood\_Ali](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Mahmood\_Ali](https://forum.ansible.com/u/Mahmood_Ali)\
**Post date:** [August 11, 2020, 11:28am UTC](https://forum.ansible.com/t/unable-to-install-applications-after-downloading-in-vm-using-ansible/33584/1 "2020-08-11T11:28:11Z")

</div>

Hi  
I am having an issue in installing an application using ansible automation. I tried to deploy an application from ansible server to the windows virtual machine in the same vnet. I tried to install git.exe and notepad++.exe files into the windows virtual machine using ansibleplaybooks.when i run the command " ansible-playbook -i /home/ansibleuser01/ansibleplaybooks/inventory/inventory.yml /home/ansibleuser01/ansibleplaybooks/noteapp.yml.  
It creates a VM, It creates a folder named software, downloads the .exe zip file into the folder. It unzips the file and the below screen appears and it stops(as shown in the attachment). The code is as shared below.

- name: Installing .NET Framework 4.8  
win\_package:  
path: “[https://go.microsoft.com/fwlink/?LinkId=2085155](https://go.microsoft.com/fwlink/?LinkId=2085155)”  
product\_id: none  
state: present  
arguments: /q
- pause: seconds=150
- name: Installing IIS features  
win\_optional\_feature:  
name:
- IIS-WebServerRole
- IIS-WebServer
- IIS-CommonHttpFeatures
- IIS-DefaultDocument
- IIS-DirectoryBrowsing
- IIS-HttpErrors
- IIS-StaticContent
- IIS-HealthAndDiagnostics
- IIS-HttpLogging
- IIS-Performance
- IIS-HttpCompressionStatic
- IIS-Security
- IIS-RequestFiltering
- IIS-ApplicationDevelopment
- IIS-WebSockets
- IIS-WebServerManagementTools
- IIS-ManagementConsole  
state: present
- name: Craeting a Folder to Download the applications  
win\_shell: mkdir C:\softwares  
args:  
executable: cmd.exe
- name: Downloading Git-2.28.0-64-bit.zip file  
win\_get\_url:  
url: “[https://hilmah001.blob.core.windows.net/myapps/Git-2.28.0-64-bit.zip](https://hilmah001.blob.core.windows.net/myapps/Git-2.28.0-64-bit.zip)”  
dest: ‘C:\softwares\Git-2.28.0-64-bit.zip’
- name: Unzip Git-2.28.0-64-bit.zip file  
win\_shell: tar -xvf Git-2.28.0-64-bit.zip  
args:  
executable: cmd.exe  
chdir: C:\softwares
- name: grant the ansible user the SeTcbPrivilege right  
win\_user\_right:  
name: SeTcbPrivilege  
users: ansibleadmin  
action: add
- name: Install Git  
win\_package:  
path: C:\softwares\Git-2.28.0-64-bit.exe  
product\_id: none  
arguments:
- /install
- /passive
- /norestart
- name: Downloading Installer.zip file  
win\_get\_url:  
url: “[https://hilmah001.blob.core.windows.net/myapps/Installer.zip](https://hilmah001.blob.core.windows.net/myapps/Installer.zip)”  
dest: ‘C:\softwares\Installer.zip’
- name: Unzip Installer.zip file  
win\_shell: tar -xvf Installer.zip  
args:  
executable: cmd.exe  
chdir: C:\softwares
- name: Install Notepad++  
win\_package:  
path: C:\softwares\npp.7.7.1.Installer.x64.exe  
product\_id: none  
arguments:
- /install
- /passive
- /norestart
- name: Installing .NET Hosting 3.1.2 Bundle  
win\_package:  
path: “[https://download.visualstudio.microsoft.com/download/pr/dd119832-dc46-4ccf-bc12-69e7bfa61b18/990843c6e0cbd97f9df68c94f6de6bb6/dotnet-hosting-3.1.2-win.exe](https://download.visualstudio.microsoft.com/download/pr/dd119832-dc46-4ccf-bc12-69e7bfa61b18/990843c6e0cbd97f9df68c94f6de6bb6/dotnet-hosting-3.1.2-win.exe)”  
product\_id: none  
state: present  
arguments: /q /norestart
- name: Stop Windows themes services, if started  
win\_service:  
name: Themes  
state: stopped
- name: Disable Windows themes services  
win\_command: powershell.exe -  
args:  
stdin: Set-Service -Name Themes -StartupType Disabled
- name: Stop Windows Update services, if started  
win\_service:  
name: wuauserv  
state: stopped
- name: Disable Windows Update services  
win\_command: powershell.exe -  
args:  
stdin: Set-Service -Name wuauserv -StartupType Disabled

![error](https://user-images.githubusercontent.com/67511570/89888936-6ddb2800-dbee-11ea-895e-44920ef585c4.PNG)

I think it needs some admin rights to install the application. Please advice what to do.

---

<div class="post-metadata">

**Author:** ![Gajendra\_Gaikwad1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gajendra\_Gaikwad1](https://forum.ansible.com/u/Gajendra_Gaikwad1)\
**Post date:** [September 4, 2020, 4:23am UTC](https://forum.ansible.com/t/unable-to-install-applications-after-downloading-in-vm-using-ansible/33584/2 "2020-09-04T04:23:04Z")

</div>

Please share the error message  
Advice  
Use below modules

```auto
win_unzip

```

```auto
Win_file

```

```auto
Win_shell

```
