1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/roles/ansistrano.deploy/tasks/update-code/rsync.yml

22 lines
877 B
YAML
Raw Permalink Normal View History

2022-05-02 17:37:08 +02:00
---
- name: ANSISTRANO | RSYNC | Get shared path (in rsync case)
command: echo "{{ ansistrano_shared_path }}/.shared-copy"
check_mode: no
register: ansistrano_shared_rsync_copy_path
- name: ANSISTRANO | RSYNC | Rsync application files to remote shared copy
synchronize:
src: "{{ ansistrano_deploy_from }}"
dest: "{{ ansistrano_shared_rsync_copy_path.stdout }}"
set_remote_user: "{{ ansistrano_rsync_set_remote_user }}"
recursive: yes
delete: yes
archive: yes
compress: yes
use_ssh_args: "{{ ansistrano_rsync_use_ssh_args | default(omit) }}"
rsync_opts: "{{ ansistrano_rsync_extra_params | default(omit) }}"
rsync_path: "{{ ansistrano_rsync_path | default(omit) }}"
- name: ANSISTRANO | RSYNC | Deploy existing code to servers
command: cp -a {{ ansistrano_shared_rsync_copy_path.stdout }} {{ ansistrano_release_path.stdout }}