win_command

21 views
Skip to first unread message

Manish Kumar

unread,
Aug 26, 2019, 9:09:31 AM8/26/19
to Ansible Project
Dear All,

I am able to install notepad in the window server but unable to do it in specific directory  like D:\npp\.  

- name: install notepad plus plus playbook
  hosts: win
  gather_facts: no
  tasks:
    - name: fetch notepad-plus-plus installer
      win_command: C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe  /S
      register: output
      arguments: "INSTALLDIR=C:/mk"-- It does not work so is there any option available so that I can install it in a specific directory ?

Thanks,
Manish

Jordan Borean

unread,
Aug 26, 2019, 4:14:05 PM8/26/19
to Ansible Project
INSTALLDIR looks like just another argument for the executable so it just comes after your /S like;

- win_command: C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe /S INSTALLDIR=C:/mk

Thanks

Jordan

Manish Kumar

unread,
Aug 27, 2019, 1:22:43 AM8/27/19
to Ansible Project
I have modified it as suggested but same result and it is installing in default directory i.e c:\Users\programefiles86*\... 

uday kiran

unread,
Aug 27, 2019, 1:30:34 AM8/27/19
to ansible...@googlegroups.com
Keep /S also in the argument section

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d41b39ae-708d-4128-986e-439d085b168e%40googlegroups.com.

uday kiran

unread,
Aug 27, 2019, 1:31:32 AM8/27/19
to Ansible Project
Keep /S also in the argument section.
Reply all
Reply to author
Forward
0 new messages