<commit_before>---
# Update code deployment step
- name: Ensure deployment base path exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}

- name: Ensure releases folder exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}

- name: Ensure shared elements folder exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}/shared

- name: Ensure shared copy for rsync improvement exists (in rsync case)
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}/.shared-copy
  when: ansistrano_deploy_via == 'rsync'

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

- name: Get release path
  command: echo "{{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}/{{ timestamp.stdout }}"
  register: release_path

- name: Get releases path
  command: echo "{{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}"
  register: releases_path

- name: Get shared path (in rsync case)
  command: echo "{{ ansistrano_deploy_to }}/shared/cached-copy"
  register: shared_path
  when: ansistrano_deploy_via == 'rsync'

- name: Rsync application files to remote shared copy (in rsync case)
  synchronize: src={{ ansistrano_deploy_from }} dest={{ shared_path.stdout }} recursive=yes delete=yes archive=yes compress=yes rsync_opts={{ ansistrano_rsync_extra_params }}
  when: ansistrano_deploy_via == 'rsync'

- name: Deploy existing code to servers
  command: cp -pr {{ shared_path.stdout }} {{ release_path.stdout }}
  when: ansistrano_deploy_via == 'rsync'

- name: Deploy existing code to remote servers
  copy: src={{ ansistrano_deploy_from }} dest={{ release_path.stdout }}
  when: ansistrano_deploy_via == 'copy'

- name: Update remote repository
  git: repo={{ ansistrano_git_repo }} dest={{ ansistrano_deploy_to }}/shared version={{ ansistrano_git_branch }} accept_hostkey=true update=yes
  when: ansistrano_deploy_via == 'git'

- name: Export a copy of the repo<commit_msg>Fix rsync shared copy path<commit_after>---
# Update code deployment step
- name: Ensure deployment base path exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}

- name: Ensure releases folder exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}

- name: Ensure shared elements folder exists
  file: state=directory recurse=yes path={{ ansistrano_deploy_to }}/shared

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

- name: Get release path
  command: echo "{{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}/{{ timestamp.stdout }}"
  register: release_path

- name: Get releases path
  command: echo "{{ ansistrano_deploy_to }}/{{ ansistrano_version_dir }}"
  register: releases_path

- name: Get shared path (in rsync case)
  command: echo "{{ ansistrano_deploy_to }}/shared/.shared-copy"
  register: shared_path
  when: ansistrano_deploy_via == 'rsync'

- name: Rsync application files to remote shared copy (in rsync case)
  synchronize: src={{ ansistrano_deploy_from }} dest={{ shared_path.stdout }} recursive=yes delete=yes archive=yes compress=yes rsync_opts={{ ansistrano_rsync_extra_params }}
  when: ansistrano_deploy_via == 'rsync'

- name: Deploy existing code to servers
  command: cp -pr {{ shared_path.stdout }} {{ release_path.stdout }}
  when: ansistrano_deploy_via == 'rsync'

- name: Deploy existing code to remote servers
  copy: src={{ ansistrano_deploy_from }} dest={{ release_path.stdout }}
  when: ansistrano_deploy_via == 'copy'

- name: Update remote repository
  git: repo={{ ansistrano_git_repo }} dest={{ ansistrano_deploy_to }}/shared version={{ ansistrano_git_branch }} accept_hostkey=true update=yes
  when: ansistrano_deploy_via == 'git'

- name: Export a copy of the repo
{'fraction_non_alphanumeric': 0.11332112012562157, 'fraction_numerical': 0.0, 'mean_word_length': 5.338308457711443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2447798', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1213, 'n_words': 349}