When executing a synchronize I get the following error.

This the executed code

- name: Restore repositories
  synchronize: src="{{ item }}" mode=push dest="/home/git"
  with_lines: "find /home/git/*.git -type d -maydepth 0"
  tags: restore


This is the error message I get with each directory.

failed: [srv01] => (item=/home/git/XXX.git) => {"failed": true, 
"invocation": {"module_args": {"_local_rsync_path": "rsync", "dest": 
"[email protected]:/home/git", "dest_port": XX, "mode": "push", 
"private_key": "id_rsa_XXX", "rsync_path": "\"sudo rsync\"", "src": 
"/home/git/DIR.git"}, "module_name": "synchronize"}, "item": 
"/home/git/DIR.git", "module_stderr": "sudo: sorry, a password is required 
to run sudo\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": 
false}

The remote user XXX has a passwordless sudo to root. It works since I can 
install packages. So why does it complain that sudo requires a password ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9aa23e9f-ebd9-4d5a-ac60-afb6a123508b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to