Hi Rakesh,
I create the following play for you with a variable that you can loop and access the src and dest for the links.
---
- name: create softlink
hosts: servers
gather_facts: off
vars:
sf_links:
- src: /tmp/Test_10.0.0
dest: /tmp/Test
- src: /tmp/Test_11.0.0
dest: /tmp/Prod
- src: /tmp/Test_13.0.0
dest: /tmp/Dev
tasks:
- name: create softlinks
file:
src: "{{item.src}}"
dest: "{{item.dest}}"
state: link
loop: "{{sf_links}}"--
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/7fe98ae3-4fc6-452f-bd2b-79121dd651e2%40googlegroups.com.