---
# Update code deployment step
- local_action:
    set_fact ansistrano_release_version={{ lookup('pipe', 'date -u +%Y%m%d%H%M%SZ') }}
  run_once: true
  when: ansistrano_release_version is not defined

- name: ANSISTRANO | Get release path
  command: echo "{{ ansistrano_releases_path.stdout }}/{{ ansistrano_release_version }}"
  register: ansistrano_release_path

- include: "update-code/{{ ansistrano_deploy_via | default('rsync') }}.yml"

- name: ANSISTRANO | Copy release version into REVISION file
  shell: echo {{ ansistrano_release_version }} > {{ ansistrano_release_path.stdout }}/REVISION

---
# Update code deployment step
- local_action:
    set_fact ansistrano_release_version={{ lookup('pipe', 'date -u +%Y%m%d%H%M%SZ') }}
  run_once: true
  when: ansistrano_release_version is not defined

- name: ANSISTRANO | Get release path
  command: echo "{{ ansistrano_releases_path.stdout }}/{{ ansistrano_release_version }}"
  register: ansistrano_release_path

- include: "update-code/{{ ansistrano_deploy_via | default('rsync') }}.yml"

- name: ANSISTRANO | Copy release version into REVISION file
  copy: content={{ ansistrano_release_version }} dest={{ ansistrano_release_path.stdout }}/REVISION

Make use of copy module instead of shell
Make use of copy module instead of shell
