%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/win_servermanager.pyo

�
���^c@@sqdZddlmZmZmZddlZddlZd�Zde
e
ddd�Zde
e
d�ZdS(u
Manage Windows features via the ServerManager powershell module. Can install and
remove roles/features.

:maintainer:    Shane Lee <slee@saltstack.com>
:platform:      Windows Server 2008R2 or greater
:depends:       win_servermanager.install
:depends:       win_servermanager.remove
i(tabsolute_importtunicode_literalstprint_functionNcC@sdtkrdStS(u2
    Load only if win_servermanager is loaded
    uwin_servermanager.installuwin_servermanager(t__salt__tFalse(((sA/usr/lib/python2.7/site-packages/salt/states/win_servermanager.pyt__virtual__sc
K@s�d|kr2tjjjdd�|jd�ni|d6td6id6dd6}|dkrr|jd	�}nt|t	�s�|jd	�}nt
d
�}g}	xX|D]P}
|
|kr�dj|�|d|
<q�|r�d|d|
<q�|	j|
�q�W|	r-|	j
d
d�dj|	�|d<n|ds;|StdrSd|d<|St
d|d|d|d|d|�}|d|d<g}g}
g}x�|dD]�}
|d|
jdt�s�|jdj|
��q�d|d|
dkr|
jdj|
��q�d|d|
dkr�|jdj|
��q�q�W|r^|j
d
d�n|
rw|
j
d
d�n|r�|j
d
d�ndj||
|�|d<t
d
�}tjjj||�|d<|S( ua
    Install the windows feature. To install a single feature, use the ``name``
    parameter. To install multiple features, use the ``features`` parameter.

    .. note::
        Some features require reboot after un/installation. If so, until the
        server is restarted other features can not be installed!

    Args:

        name (str):
            Short name of the feature (the right column in
            win_servermanager.list_available). This can be a single feature or a
            string of features in a comma delimited list (no spaces)

            .. note::
                A list is not allowed in the name parameter of any state. Use
                the ``features`` parameter if you want to pass the features as a
                list

        features (Optional[list]):
            A list of features to install. If this is passed it will be used
            instead of the ``name`` parameter.

            .. versionadded:: 2018.3.0

        recurse (Optional[bool]):
            Install all sub-features as well. If the feature is installed but
            one of its sub-features are not installed set this will install
            additional sub-features

        source (Optional[str]):
            Path to the source files if missing from the target system. None
            means that the system will use windows update services to find the
            required files. Default is None

        restart (Optional[bool]):
            Restarts the computer when installation is complete, if required by
            the role/feature installed. Default is False

        exclude (Optional[str]):
            The name of the feature to exclude when installing the named
            feature. This can be a single feature, a string of features in a
            comma-delimited list (no spaces), or a list of features.

            .. warning::
                As there is no exclude option for the ``Add-WindowsFeature``
                or ``Install-WindowsFeature`` PowerShell commands the features
                named in ``exclude`` will be installed with other sub-features
                and will then be removed. **If the feature named in ``exclude``
                is not a sub-feature of one of the installed items it will still
                be removed.**

    Example:

        Do not use the role or feature names mentioned in the PKGMGR
        documentation. To get a list of available roles and features run the
        following command:

        .. code-block:: bash

            salt <minion_name> win_servermanager.list_available

        Use the name in the right column of the results.

    .. code-block:: yaml

        # Installs the IIS Web Server Role (Web-Server)
        IIS-WebServerRole:
          win_servermanager.installed:
            - recurse: True
            - name: Web-Server

        # Install multiple features, exclude the Web-Service
        install_multiple_features:
          win_servermanager.installed:
            - recurse: True
            - features:
              - RemoteAccess
              - XPS-Viewer
              - SNMP-Service
            - exclude:
              - Web-Server
    uforceuNeonu�Parameter 'force' has been detected in the argument list. Thisparameter is no longer used and has been replaced by 'recurse'as of Salt 2018.3.0. This warning will be removed in Salt Neon.unameuresultuchangesuucommentu,u win_servermanager.list_installeduWill be installed recurse={0}u0Already installed but might install sub-featuresiu-The following features are already installed:u
- utestuwin_servermanager.installtrecursetrestarttsourcetexcludeuSuccessuFeaturesu- {0}u	(exclude)uMessageu Failed to install the following:uInstalled the following:u Removed the following (exclude):u
N(tsalttutilstversionst
warn_untiltpoptTruetNonetsplitt
isinstancetlistRtformattappendtinserttjoint__opts__tgettdatat
compare_dicts(tnametfeaturesRRRR	tkwargstrettoldtcur_feattfeaturetstatust	fail_feattnew_feattrem_feattnew((sA/usr/lib/python2.7/site-packages/salt/states/win_servermanager.pyt	installedsj[






	
cC@si|d6td6id6dd6}|dkr@|jd�}nt|t�sa|jd�}ntd�}g}x8|D]0}||kr�d|d|<q{|j|�q{W|r�|jd	d
�dj|�|d<n|ds�|St	drd|d<|Std
|d|d|�}|d|d<g}	g}x[|dD]O}|d|j
dt�s{|	jdj|��qB|jdj|��qBW|	r�|	jd	d�n|r�|jd	d�ndj|	|�|d<td�}
tj
jj||
�|d<|S(ua
    Remove the windows feature To remove a single feature, use the ``name``
    parameter. To remove multiple features, use the ``features`` parameter.

    Args:
        name (str):
            Short name of the feature (the right column in
            win_servermanager.list_available). This can be a single feature or a
            string of features in a comma-delimited list (no spaces)

            .. note::
                A list is not allowed in the name parameter of any state. Use
                the ``features`` parameter if you want to pass the features as a
                list

        features (Optional[list]):
            A list of features to remove. If this is passed it will be used
            instead of the ``name`` parameter.

            .. versionadded:: 2018.3.0

        remove_payload (Optional[bool]):
            True will cause the feature to be removed from the side-by-side
            store. To install the feature in the future you will need to
            specify the ``source``

        restart (Optional[bool]):
            Restarts the computer when uninstall is complete if required by the
            role/feature uninstall. Default is False

    .. note::
        Some features require a reboot after uninstall. If so the feature will
        not be completely uninstalled until the server is restarted.

    Example:

        Do not use the role or feature names mentioned in the PKGMGR
        documentation. To get a list of available roles and features run the
        following command:

        .. code-block:: bash

            salt <minion_name> win_servermanager.list_available

        Use the name in the right column of the results.

    .. code-block:: yaml

        # Uninstall the IIS Web Server Rol (Web-Server)
        IIS-WebserverRole:
          win_servermanager.removed:
            - name: Web-Server

        # Uninstall multiple features, reboot if required
        uninstall_multiple_features:
          win_servermanager.removed:
            - features:
              - RemoteAccess
              - XPX-Viewer
              - SNMP-Service
            - restart: True
    unameuresultuchangesuucommentu,u win_servermanager.list_installeduWill be removediu)The following features are not installed:u
- utestuwin_servermanager.removetremove_payloadRuSuccessuFeaturesu- {0}uFailed to remove the following:uRemoved the following:u
N(RRRRRRRRRRRRR
RRR(RRR)RRR R&R"R#R$R'((sA/usr/lib/python2.7/site-packages/salt/states/win_servermanager.pytremoved�sN?







(
t__doc__t
__future__RRRtsalt.utils.dataR
tsalt.utils.versionsRRRR(R*(((sA/usr/lib/python2.7/site-packages/salt/states/win_servermanager.pyt<module>
s	�

Zerion Mini Shell 1.0