---
- name: Get release timestamp
  command: date +%Y%m%d%H%M%S
  register: timestamp

- name: Construct release path
  command: echo "{{ releases_dir }}/{{ timestamp.stdout }}"
  register: release_path

- name: Create release directory
  file: >
    state=directory
    owner=mvriel
    group=users
    recurse=yes
    path={{ release_path.stdout }}

- name: Copy release
  synchronize: src={{ project_dir }}/ dest={{ release_path.stdout }} rsync_opts=--no-motd,-C,--exclude=ansible,--exclude=puppet,--exclude=design

- name: Update app version
  file: >
    state=link
    path={{ releases_dir }}/current
    src={{ release_path.stdout }}
---
- name: Get release timestamp
  command: date +%Y%m%d%H%M%S
  register: timestamp

- name: Construct release path
  command: echo "{{ releases_dir }}/{{ timestamp.stdout }}"
  register: release_path

- name: Create release directory
  file: >
    state=directory
    owner=mvriel
    group=users
    recurse=yes
    path={{ release_path.stdout }}

- name: Copy release
  synchronize: src={{ project_dir }}/ dest={{ release_path.stdout }} rsync_opts=--no-motd,--exclude=ansible,--exclude=.git,--exclude=puppet,--exclude=design

- name: Update app version
  file: >
    state=link
    path={{ releases_dir }}/current
    src={{ release_path.stdout }}
Change exclusion of rsync; it blocks files with tag in them
Change exclusion of rsync; it blocks files with tag in them
