diff --git a/library/source_control/git b/library/source_control/git index c241b8b5e61..d6bfb554e31 100644 --- a/library/source_control/git +++ b/library/source_control/git @@ -83,10 +83,9 @@ options: the normal mechanism for resolving binary paths will be used. notes: - If the task seems to be hanging, first verify remote host is in C(known_hosts). - SSH will prompt user to authorize the first contact with a remote host. One solution is to add - C(StrictHostKeyChecking no) in C(.ssh/config) which will accept and authorize the connection - on behalf of the user. However, if you run as a different user such as setting sudo to True), - for example, root will not look at the user .ssh/config setting. + SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, + one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts) before calling + the git module, with the following command: ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts. ''' EXAMPLES = ''' diff --git a/library/source_control/hg b/library/source_control/hg index bb2f55effee..6da2e5675d9 100644 --- a/library/source_control/hg +++ b/library/source_control/hg @@ -74,11 +74,9 @@ options: the normal mechanism for resolving binary paths will be used. notes: - If the task seems to be hanging, first verify remote host is in C(known_hosts). - SSH will prompt user to authorize the first contact with a remote host. One solution is to add - C(StrictHostKeyChecking no) in C(.ssh/config) which will accept and authorize the connection - on behalf of the user. However, if you run as a different user such as setting sudo to True), - for example, root will not look at the user .ssh/config setting. - + SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, + one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts) before calling + the hg module, with the following command: ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts. requirements: [ ] '''