Ansible synchronize prompts passphrase even if already entered at the beginning

后端 未结 5 1969
青春惊慌失措
青春惊慌失措 2021-02-06 06:28

The synchronize module of Ansible (v1.6.5) prompts for the passphrase (Enter passphrase for key) even though I already entered it at the beginning of running th

5条回答
  •  甜味超标
    2021-02-06 07:20

    I think by default synchronize is explicitly setting a username on the rsync command - you can prevent this and allow rsync to work from your ssh config file.

    http://docs.ansible.com/synchronize_module.html

    set_remote_user put user@ for the remote paths. If you have a custom ssh config to define the remote user for a host that does not match the inventory user, you should set this parameter to "no".

    I have a remote user configured in my ssh config and needed to add set_remote_user=no to get synchronize to work, otherwise it tried to use the wrong username and neither ssh key nor password would work.

提交回复
热议问题