ansible-playbook msi_install.yml -vvv

The problems( in red)
- the find command is OK
- but instead of getting the value of the target host like "199.121.121.1" 
i am getting "win_host1"
- where should I define the varible "repoPath" i have few more variable 
related only for the localhost like "repoReleasePath" etc...(alll mounted 
in linux to windows)

file name: win_global.yml
---
 - include: "msi_install.yml comp_name=COMP1 target=win_host1"
 - include: "msi_install.yml comp_name=COMP2 target=win_host1"
 - include: "msi_install.yml comp_name=COMP3 target=win_host2"
 - include: "msi_install.yml comp_name=COMP4 target=win_host2"



file name: hosts.yml
---
[localhost]

[win_servers]
win_host1: ansible_host=199.121.121.1
win_host1: ansible_host=199.199.33.33



file name: msi_install.yml
---
 - hosts: localhost
   tasks:
   name: find latest msi (mounted in linux)
# the repoPath is mounting also in linux to windows
   shell: find {{repoPath}} -type f -iname  "{{comp_name}}*" | tail -n1
   register: msi_name
   
   name: copy msi to target window host
   shell: cp {{ hostvars.localhost.msi_name.stdout }} {{ target }}

-- 
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/5785aa0d-750e-46d9-838e-c331f8bf03b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to