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.
This commit is contained in:
parent
c6c15771b0
commit
970d7cadb7
1 changed files with 4 additions and 1 deletions
|
@ -524,7 +524,10 @@ class Facts(object):
|
|||
keytypes = ('dsa', 'rsa', 'ecdsa', 'ed25519')
|
||||
|
||||
if self.facts['system'] == 'Darwin':
|
||||
keydir = '/etc'
|
||||
if self.facts['distribution'] == 'MacOSX' and LooseVersion(self.facts['distribution_version']) >= LooseVersion('10.11') :
|
||||
keydir = '/etc/ssh'
|
||||
else:
|
||||
keydir = '/etc'
|
||||
else:
|
||||
keydir = '/etc/ssh'
|
||||
|
||||
|
|
Loading…
Reference in a new issue