Merge "Add tripleo-ssh-known-hosts role"

This commit is contained in:
Zuul 2018-02-12 12:03:22 +00:00 committed by Gerrit Code Review
commit 31578a4763
7 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- Support for the SshKnownHostsDeployment resources has been fixed by adding
a new role that can be used to configure /etc/ssh/ssh_known_hosts
on each host.

View File

@ -0,0 +1,41 @@
tripleo-ssh-known-hosts
=======================
An Ansible role to add all SSH host keys to the host level known hosts file on
all hosts.
Requirements
------------
This section needs to be documented.
Role variables
--------------
- ssh_known_hosts: -- Dict of hostname to ssh_known_hosts entries for a given
host
Dependencies
------------
None.
Example Playbook
----------------
Sample playbook to call the role:
- name: Configure SSH known hosts
hosts: all
roles:
- tripleo-ssh-known-hosts
License
-------
Free software: Apache License (2.0)
Author Information
------------------
OpenStack TripleO team

View File

@ -0,0 +1,3 @@
---
ssh_known_hosts: {}

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1,8 @@
---
- name: Template /etc/ssh/ssh_known_hosts
template:
src: ssh_known_hosts.j2
dest: /etc/ssh/ssh_known_hosts
tags:
- tripleo_ssh_known_hosts

View File

@ -0,0 +1,3 @@
{% for host in groups['overcloud'] %}
{{ ssh_known_hosts[hostvars[host]['ansible_nodename']] + ' ' + hostvars[host]['ansible_ssh_host_key_ecdsa_public'] }}
{% endfor %}