use fqdn in known_hosts

This commit is contained in:
Sergey Bubnov 2018-11-01 23:59:05 +04:00
parent d990db6f83
commit 22af0daf5b

View File

@ -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