Try the below as long as you have your WinRm creds configured correctly
within ansible it should use those creds to connect to your Windows hosts.
The below register the path of S:\ClaimWin to that variable you can use
that later for any purpose you need. It then copies the file locally onto
c:/temp/ then installs it once the installs complete it removes it from
c:/temp.
---
- hosts: Windows
tasks:
- name: check to see if ClamWin installed
win-stat: S:\ClamWin\
register: ClamWin_installed
- name: Copy file locally
- win_copy: src=S:\ClamWin\clamwin-0.99.1-setup.exe
dest=c:/temp/clamwin-0.99.1-setup.exe
- name: Install ClamWin
win_package:
name=clamwin-0.99.1-setup.exe
path=c:/temp/clamwin-0.99.1-setup.exe
Arguments="/install /passive /norestart"
- name: Remove local file
- win_file: path=c:/temp/clamwin-0.99.1-setup.exe state=absent
On Thursday, June 2, 2016 at 3:04:47 PM UTC-4, Johannes Kastl wrote:
>
> On 02.06.16 20:39 Trond Hindenes wrote:
> > is "S:" a local or mapped drive?
> >
> How should I know, it's your machine... ;-)
>
> Just try and log into the machine, copy the file from S:\... to
> somewhere on C: (where your user has the rights) and then try to run
> your playbook with this path...
>
> Johannes
>
>
--
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/e7e1261a-f6f2-4173-89b6-681c0db65ad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.