Add support for RSA/DSA SSH host key detection in setup module for OS/X

s/<8spaces>/<4spaces>/g
This commit is contained in:
Jan-Piet Mens 2012-09-06 20:21:05 +02:00
parent 08a3079166
commit cbcd04b692

10
setup
View file

@ -104,8 +104,14 @@ class Facts(object):
self.facts['distribution'] = name
def get_public_ssh_host_keys(self):
dsa = get_file_content('/etc/ssh/ssh_host_dsa_key.pub')
rsa = get_file_content('/etc/ssh/ssh_host_rsa_key.pub')
dsa_filename = '/etc/ssh/ssh_host_dsa_key.pub'
rsa_filename = '/etc/ssh/ssh_host_rsa_key.pub'
if self.facts['system'] == 'Darwin':
dsa_filename = '/etc/ssh_host_dsa_key.pub'
rsa_filename = '/etc/ssh_host_rsa_key.pub'
dsa = get_file_content(dsa_filename)
rsa = get_file_content(rsa_filename)
if dsa is None:
dsa = 'NA'
else: