Deploy hanging indefinitely at copy project files step

@yyyyaaa Here is a possible explanation for why the task is hanging:

The git clone task will cause your server to reach out to the git.conceptual.site host. The Ansible docs for the related git module mention this:

If the task seems to be hanging, first verify remote host is in known_hosts. SSH will prompt user to authorize the first contact with a remote host.

The implication is that if your server doesn’t already “know” the git.conceptual.site host, the task could be hanging with the prompt The authenticity of host ... can't be established. Are you sure you want to continue connecting (yes/no)? – but Ansible doesn’t show you the prompt and it hangs, and you can’t just type yes because it is not an interactive session.

This usually doesn’t happen on the git clone task because the Trellis default is accept_hostkey: true (because of the default repo_accept_hostkey: true), avoiding the prompt that would cause the task to hang.

Good news. Trellis gives you a means to make the git.conceptual.site host known ahead of time, avoiding all the trouble above. You could add git.conceptual.site to group_vars/all/known_hosts.yml. This command may help you find the key to add:

ssh-keyscan git.conceptual.site

This is probably the key you want:

git.conceptual.site ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKTAnYTdH7CghvIVHS8NLyAFTXwjgnZHbcUWntkxJ+c3

Review this thread for discussion of known_hosts in general and how it is used in Trellis.

3 Likes