Merge pull request #39542 from twangboy/gate_ssh_known_hosts

Gate ssh_known_hosts state against Windows
This commit is contained in:
Mike Place 2017-02-22 13:16:40 -07:00 committed by GitHub
commit 8f7a0f9d96

View file

@ -27,6 +27,19 @@ import os
import salt.utils
from salt.exceptions import CommandNotFoundError
# Define the state's virtual name
__virtualname__ = 'ssh_known_hosts'
def __virtual__():
'''
Does not work on Windows, requires ssh module functions
'''
if salt.utils.is_windows():
return False, 'ssh_known_hosts: Does not support Windows'
return __virtualname__
def present(
name,