Skip to content
Snippets Groups Projects
Commit 8ab92b22 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch 'known_hosts' into 'master'

Create ssh_known_hosts directly from host keys

Closes #46

See merge request openappstack/bootstrap!35
parents d885300a a85f59f0
No related branches found
No related tags found
No related merge requests found
---
# `rke up` needs to ssh into localhost so we need to configure
# ssh access
- name: Get master ssh-rsa public hostkey
tags:
- ssh
command: cut -d" " -f 1-2 /etc/ssh/ssh_host_rsa_key.pub
register: master_rsa_pub_hostkey
- name: Create /oas/config/ssh_known_hosts
tags:
- ssh
lineinfile:
copy:
dest: /oas/config/ssh_known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -trsa ' + ip_address) }}"
content: "{{ ip_address }} {{ master_rsa_pub_hostkey.stdout }}"
- name: Build Cluster
tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment