From 22af0daf5b82203dcdfe607a941ce53d070fcf0e Mon Sep 17 00:00:00 2001
From: Sergey Bubnov <omg@altlinux.org>
Date: Thu, 1 Nov 2018 23:59:05 +0400
Subject: [PATCH] use fqdn in known_hosts

---
 roles/common/tasks/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index b272567..121d977 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -137,7 +137,7 @@
 - name: store public ssh host key in local file
   lineinfile:
     regexp: "^{{ inventory_hostname_short}} "
-    line: "{{ inventory_hostname_short}} {{ host_key.content | b64decode }}"
+    line: "{{ inventory_hostname_short}},{{ inventory_hostname_short }}.{{ stack.domain | lower }} {{ host_key.content | b64decode | trim }}"
     path: ".tmp/{{ stack_name }}.known_hosts"
     create: yes
   delegate_to: localhost