Document requirements for win_pki

This commit is contained in:
twangboy 2017-08-09 17:49:20 -06:00
parent b3e2ae3c58
commit 7de687aa57

View file

@ -1,9 +1,18 @@
# -*- coding: utf-8 -*-
'''
Microsoft certificate management via the Pki PowerShell module.
Microsoft certificate management via the PKIClient PowerShell module.
https://technet.microsoft.com/en-us/itpro/powershell/windows/pkiclient/pkiclient
The PKI Client PowerShell module is only available on Windows 8+ and Windows
Server 2012+.
https://technet.microsoft.com/en-us/library/hh848636(v=wps.620).aspx
:platform: Windows
:depends:
- PowerShell 4
- PKIClient Module (Windows 8+ / Windows Server 2012+)
.. versionadded:: 2016.11.0
'''
# Import python libs
@ -29,11 +38,17 @@ __virtualname__ = 'win_pki'
def __virtual__():
'''
Only works on Windows systems with the PKI PowerShell module installed.
Requires Windows
Requires Windows 8+ / Windows Server 2012+
Requires PowerShell
Requires PKIClient PowerShell module installed.
'''
if not salt.utils.is_windows():
return False, 'Only available on Windows Systems'
if salt.utils.version_cmp(__grains__['osversion'], '6.2.9200') == -1:
return False, 'Only available on Windows 8+ / Windows Server 2012 +'
if not __salt__['cmd.shell_info']('powershell')['installed']:
return False, 'Powershell not available'