Skip to content

Instantly share code, notes, and snippets.

@shirshakparakhi
Last active December 20, 2016 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirshakparakhi/b7a257c1c9f87729846955d2edf5b757 to your computer and use it in GitHub Desktop.
Save shirshakparakhi/b7a257c1c9f87729846955d2edf5b757 to your computer and use it in GitHub Desktop.
Failing symlink
#Syntax 1
#=================
- name: Creating symlinks of Products
file:
src: '/var/www/html/{{ item.src }}/'
dest: '/var/www/html/simpleRepoTwo/simpleRepoThree/{{release_folder}}/{{ item.dest }}'
state: link
with_items:
- src: simpleRepo
dest: productOne
- src: simpleRepo
dest: productTwo
- src: simpleRepo
dest: productThree
- src: simpleRepo
dest: productFour
#Syntax 2
#=====================================
- name: Creating symlinks of Products
file:
src: '/var/www/html/{{ item.src }}/'
dest: '/var/www/html/simpleRepoTwo/simpleRepoThree/{{release_folder}}/{{ item.dest }}'
state: link
with_items:
- { src: 'simpleRepo', dest: 'productOne' }
- { src: 'simpleRepo', dest: 'productTwo' }
- { src: 'simpleRepo', dest: 'productThree' }
- { src: 'simpleRepo', dest: 'productFour' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment