mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39542 from twangboy/gate_ssh_known_hosts
Gate ssh_known_hosts state against Windows
This commit is contained in:
commit
8f7a0f9d96
1 changed files with 13 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue