Add ssh_host support for MacOSX El Capitan.

OS X El Capitan moved the /etc/ssh_* files into /etc/ssh/. This fix
adds a distribution version check for Darwin to set the keydir
appropriately on El Capitan and later.
pull/13567/head
David L Ballenger 9 years ago committed by James Cammarata
parent b3cfb630dc
commit dbcfce03d2

@ -524,6 +524,9 @@ class Facts(object):
keytypes = ('dsa', 'rsa', 'ecdsa', 'ed25519') keytypes = ('dsa', 'rsa', 'ecdsa', 'ed25519')
if self.facts['system'] == 'Darwin': if self.facts['system'] == 'Darwin':
if self.facts['distribution'] == 'MacOSX' and LooseVersion(self.facts['distribution_version']) >= LooseVersion('10.11') :
keydir = '/etc/ssh'
else:
keydir = '/etc' keydir = '/etc'
else: else:
keydir = '/etc/ssh' keydir = '/etc/ssh'

Loading…
Cancel
Save