hello,
i’ve this version of rsync :
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/ansible$ rsync --version
rsync version 3.3.0-22-g0902b52f protocol version 31
Copyright (C) 1996-2024 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
zstd lz4 zlibx zlib none
Daemon auth list:
sha512 sha256 sha1 md5 md4
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/
,the version of rsync on my remote server :
alexandre@ubuntu:~$ rsync --version
rsync version 3.3.0-22-g0902b52f protocol version 31
Copyright (C) 1996-2024 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, no ACLs,
xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
zstd lz4 zlibx zlib none
Daemon auth list:
sha512 sha256 sha1 md5 md4
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
alexandre@ubuntu:~$
the permissions of rsync ,on my remote server :
ls -ld /usr/local/bin/rsync
-rwxr-xr-x 1 root root 1587224 Nov 4 11:51 /usr/local/bin/rsync
i’ve this playbook:
cat ./playbook.yml
- hosts: servers
become: yes
vars:
symfony_root: /var/www/AnalyticaTechCode
local_project_root: "/home/alexandre/Documents/AnalyticaTechCode"
tasks:
- name: Ensure directory exists
file:
path: "{{ symfony_root }}"
state: directory
owner: www-data
group: www-data
mode: '0755'
- name: Synchronize project files
synchronize:
src: "/home/alexandre/Documents/AnalyticaTechCode/"
dest: "/var/www/AnalyticaTechCode"
rsync_opts:
- "--rsync-path='sudo rsync'"
become: no
- name: Set final permissions
file:
path: "{{ symfony_root }}"
owner: www-data
group: www-data
mode: '0755'
recurse: yes
this iventory.ini:
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/ansible$ cat ./inventory.ini
[servers]
ubuntu ansible_host=xx.xx.xx.xx ansible_user=alexandre
[all:vars]
ansible_python_interpreter=/usr/bin/python3
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/ansible$
and when i execute this command , i’ve this error:
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/ansible$ ansible-playbook playbook.yml --ask-pass --ask-become-pass
SSH password:
BECOME password[defaults to SSH password]:
PLAY [servers] ****************************************************************************************
TASK [Gathering Facts] ********************************************************************************
ok: [ubuntu]
TASK [Ensure directory exists] ************************************************************************
ok: [ubuntu]
TASK [Synchronize project files] **********************************************************************
alexandre@xx.xx.xx.xx's password:
fatal: [ubuntu]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/rsync --delay-updates -F --compress --archive --rsh='/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --rsync-path='sudo rsync' --out-format='<<CHANGED>>%i %n%L' /home/alexandre/Documents/AnalyticaTechCode/ alexandre@xx.xx.xx.xx:/var/www/AnalyticaTechCode", "msg": "Warning: Permanently added 'xx.xx.xx.xx' (ED25519) to the list of known hosts.\r\nsudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper\nsudo: a password is required\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(232) [sender=3.3.0-22-g0902b52f]\n", "rc": 12}
PLAY RECAP ********************************************************************************************
ubuntu : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
(env) alexandre@alexandre-Matebook:~/Documents/AnalyticaTechCode/ansible$
what can i do ? could you help me ?
Regards