summaryrefslogtreecommitdiff
path: root/ansible/roles/trove-setup/tasks/known-hosts-setup.yml
blob: a8d18f7d8dcabe14717f4c1be198734632323dca (plain)
1
2
3
4
5
6
7
8
9
10
# Depends on:
# - check.yml
---
# If UPSTREAM_TROVE is not defined, the jinja2 'default' filter will
# replace it with an empty string. ssh-keyscan skips empty hostnames,
# so it will run only with 'localhost'
- name: Add localhost and UPSTREAM_TROVE to /etc/ssh/ssh_known_hosts
  shell: |
         ssh-keyscan localhost {{ UPSTREAM_TROVE|default('')|quote }} > /etc/ssh/ssh_known_hosts
         creates=/etc/ssh/ssh_known_hosts