0
I wish to synchronize letsencrypt credentials from host S to Host D using an ansible task running on host H.
My current task looks like this:
- name: Synchronize local letsencrypt directory
ansible.posix.synchronize:
src: /etc/letsencrypt
dest: /etc/letsencrypt
archive: true
checksum: true
delete: true
recursive: true
become_user: myuserid
rsync_path: "sudo rsync"
become: true
delegate_to: S
On host S:
drwxr-xr-x. 9 root root 4096 Jul 10 01:15 /etc/letsencrypt
On host D:
drwxr-xr-x. 2 root root 6 Apr 8 07:58 /etc/letsencrypt
The error message I am getting is:
TASK [sync_certs - rsync from certificate master host to certificate slave host] ******************************************
fatal: [D]: UNREACHABLE! => {"changed": false, "msg": "Invalid/incorrect password: Permission denied, please try again.", "unreachable": true}
Since root login is prohibited on all hosts, the task runs as an ordinary user with sudo permissions to execute "bash". This is the situation on all hosts.
Any help would be greatly appreciated.
PS: The following bash script runs successfully. Unfortunately, it asks for a passsword for myuserid.
sudo /usr/bin/rsync --rsync-path="sudo rsync" --acls --archive --checksum --delete --links --numeric-ids --recursive --stats --times --verbose /etc/letsencrypt myuseridl@testFedora.jlhimpel.net::letsencrypt