# Depends on: # - check.yml # Uses sshknownhosts module from: # https://github.com/bfmartin/ansible-sshknownhosts --- - name: Add localhost to /etc/ssh/ssh_known_hosts sshknownhosts: host=localhost state=present # We avoid trying to scan UPSTREAM_TROVE's host keys unless the user explicitly # configured Lorry Controller to access it over SSH. It's possible that the # Trove is behind a proxy that blocks SSH traffic, and if this step fails then # the whole trove-setup.service will fail. - name: Add {{ UPSTREAM_TROVE }} to /etc/ssh/ssh_known_hosts sshknownhosts: host={{ UPSTREAM_TROVE }} state=present when: UPSTREAM_TROVE_PROTOCOL == ssh