I would like to use Ansible to copy an .exe file from the server and install it on another computer. I wrote this script, but copying is done quite quickly, but the installation step has been dragging on for over an hour and won’t finish, nothing is moving at all. Does anyone know what this could be about? I immediately insert the code I wanted to use.Hello everyone. I would like to use Ansible to copy an .exe file from the server and install it on another computer. I wrote this script, but copying is done quite quickly, but the installation step has been dragging on for over an hour and won’t finish, nothing is moving at all. Does anyone know what this could be about? I immediately insert the code I wanted to use.
---
- hosts: win
tasks:
- name: copying from server to disk
ansible.windows.win_copy:
src: \10.0.129.234xxxInstallSumatraPDF-3.5.2-64-install.exe
dest: C:inst
remote_src: yes
force: True
become: True
become_method: runas
vars:
ansible_become_user: user
ansible_become_pass: password
- name: Install file
ansible.windows.win_package:
path: C:instSumatraPDF-3.5.2-64-install.exe
arguments: /install /passive /norestart
vars:
ansible_become_method: runas
ansible_become_user: user
ansible_become_pass: password
The last thing that is displayed after starting the playbook.
3:11:03 PMUsing module file /usr/lib/python3/dist-packages/ansible_collections/ansible/windows/plugins/modules/win_package.ps
13:11:03 PMPipelining is enabled.
3:11:03 PMESTABLISH WINRM CONNECTION FOR USER:user on PORT 5986 TO client
3:11:04 PMEXEC (via pipeline wrapper)
It hasn’t wanted to move for an hour anyway. I will also add that instead of executing these scripts on a Linux server, I execute them using the Semaphore UI web overlay.
I tried to find the product id but I can’t find it in the .exe installers. I ended up implementing chocolatey because most of the programs I need are in this repository, but not all
Mateusz Bogacz-Drewniak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.