%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s!dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlm Z m!Z!ej"d�Z#ej$e%�Z&d	�Z'e(d
dddd�Z*d
�Z+e,d
dddd�Z-d
dddd�Z.d�Z/de,ddd�Z0de,ddd�Z1de,dd�Z2de,dd�Z3de,dd�Z4de,dd�Z5de,dd�Z6de,dd�Z7de,dd�Z8de,dd�Z9de,dd�Z:de,dd�Z;ddd�Z<dd�Z=dd �Z>dd!�Z?d"�Z@d#dd$d$d%dddd&d'd(�
ZAd$ddd)dddd*�ZBdS(+ud
General management functions for salt, tools like seeing what hosts are up
and what hosts are down
i(tabsolute_importtprint_functiontunicode_literalsN(tsix(turlopen(ttagify(tSaltClientErrortSaltSystemExitu!^([a-f0-9]{2}:){15}([a-f0-9]{2})$c
C@s&tjjtd�}|j|dd|d|ddt�}|sG|Stjddjt	|d���t
�}x�|j|d|d|j|�||d	|�D]L}|r�x=t
j|�D])\}}	tjd
|�|j|�q�Wq�q�Wt	t
|d�|�}
t	|�}||
fS(Nu	conf_fileu	test.pingutlistenu3manage runner will ping the following minion(s): %su, uminionsujidtgather_job_timeoutuminion '%s' returned from ping((tsalttclienttget_local_clientt__opts__trun_jobtTruetlogtdebugtjointsortedtsettget_cli_event_returnst_get_timeoutRt	iteritemstadd(ttgtttgt_typettimeoutR	Rtpub_datatreturnedtfn_rettmidt_tnot_returned((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt_ping(s,'		
u*uglobcC@ski}|std}n|s,td}nt||||�}|sSggfn|\|d<|d<|S(u�
    .. versionchanged:: 2017.7.0
        The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
        releases must use ``expr_form``.

    Print the status of all known salt minions

    CLI Example:

    .. code-block:: bash

        salt-run manage.status
        salt-run manage.status tgt="webservers" tgt_type="nodegroup"
        salt-run manage.status timeout=5 gather_job_timeout=10
    utimeoutugather_job_timeoutuupudown(R
R"(toutputRRRR	trettres((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytstatusHs

&cC@s�tjjtd�}y|jdd�Wntk
rJ}t|�tSXxxtjj	j
td�D]]\}}}xK|D]C}tj	j||�}ytj
|�Wq{tjk
r�q{Xq{WqeWd}|S(u�
    This routine is used to regenerate all keys in an environment. This is
    invasive! ALL KEYS IN THE SALT ENVIRONMENT WILL BE REGENERATED!!

    The key_regen routine sends a command out to minions to revoke the master
    key and remove all minion keys, it then removes all keys from the master
    and prompts the user to restart the master. The minions will all reconnect
    and keys will be placed in pending.

    After the master is restarted and minion keys are in the pending directory
    execute a salt-key -A command to accept the regenerated minion keys.

    The master *must* be restarted within 60 seconds of running this command or
    the minions will think there is something wrong with the keys and abort.

    Only Execute this runner after upgrading minions and master to 0.15.1 or
    higher!

    CLI Example:

    .. code-block:: bash

        salt-run manage.key_regen
    u	conf_fileu*usaltutil.regen_keysupki_diru�The minion and master keys have been deleted.  Restart the Salt
Master within the next 60 seconds!!!

Wait for the minions to reconnect.  Once the minions reconnect
the new keys will appear in pending and will need to be re-
accepted by running:
    salt-key -A

Be advised that minions not currently connected to the master
will not be able to reconnect and may require manual
regeneration via a local call to
    salt-call saltutil.regen_keys(R
RRR
tcmdRtprinttFalsetutilstpathtos_walktosRtremoveterror(Rtclient_errortrootR tfilestfn_R+tmsg((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt	key_regends
)

cC@svtdtd|d|d|d|�jdg�}x<|D]4}|r:tjjt�}|jdd|�q:q:W|S(	u�
    .. versionchanged:: 2017.7.0
        The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
        releases must use ``expr_form``.

    Print a list of all the down or unresponsive salt minions
    Optionally remove keys of down minions

    CLI Example:

    .. code-block:: bash

        salt-run manage.down
        salt-run manage.down removekeys=True
        salt-run manage.down tgt="webservers" tgt_type="nodegroup"

    R#RRRR	udownu
key.deletetmatch(R&R)tgetR
twheeltWheelR
t	call_func(t
removekeysRRRR	R$tminionR8((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytdown�s	
cC@s7tdtd|d|d|d|�jdg�}|S(u�
    .. versionchanged:: 2017.7.0
        The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
        releases must use ``expr_form``.

    Print a list of all of the minions that are up

    CLI Example:

    .. code-block:: bash

        salt-run manage.up
        salt-run manage.up tgt="webservers" tgt_type="nodegroup"
        salt-run manage.up timeout=5 gather_job_timeout=10
    R#RRRR	uup(R&R)R7(RRRR	R$((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytup�s	cC@s*|dk	r&tjjjdd�|S|S(NuSodiumuwThe 'show_ipv4' argument has been renamed to 'show_ip' asit now also includes IPv6 addresses for IPv6-connectedminions.(tNoneR
R*tversionst
warn_until(tshow_ipt	show_ipv4((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt_show_ip_migration�sc
C@s<t||�}td}tjj|�}|ddkr�tjjjttdd|�}|jdddt	d	d
��}|d
kr�d	n|}|s�||kr�g}	q||}	|rg|	D]}
|
|kr�|
^q�}	qn-tjjjt�}|j
d|d|�}	|r,t|	�n	t|	�}|S(u�
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    state : 'available'
        Show minions being in specific state that is one of 'available', 'joined',
        'allowed', 'alived' or 'reaped'.

    CLI Example:

    .. code-block:: bash

        salt-run manage.list_state
    u	conf_fileu	transporturaetusock_dirtstatetwaiti<ttagupresentupresenceRBtsubsetN(RDR
R
tconfigt
client_configR*t	raeteventt
PresenceEventt	get_eventRR?tminionst	CkMinionst
connected_idstdictR(
RHRBRCREt	conf_filetoptsteventtdatatkeyRNtmt	ckminionst	connected((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
list_state�s 
"!	
+c
C@s�t||�}tddd|d|�}tjjt�}|j�}t|tjj	�}g}x\||j
D]M}	|r�|	d7}	n|	|krq|dks�|	|krq|j|	�qqqqW|S(u�
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    state : 'available'
        Show minions being in specific state that is one of 'available', 'joined',
        'allowed', 'alived' or 'reaped'.

    CLI Example:

    .. code-block:: bash

        salt-run manage.list_not_state
    RHRBREu_minionN(RDRZR?R
RVtget_keyR
t	list_keyst
isinstancetRaetKeytACCtappend(
RHRBRCRERYRVtkeyst
appen_kindt
not_connectedR<((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytlist_not_states
$cC@s"t||�}td|d|�S(u
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.present
    RHRB(RDRZ(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytpresent>scC@s"t||�}td|d|�S(u9
    .. versionadded:: 2015.5.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.not_present
    RHRB(RDRd(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytnot_presentWscC@s(t||�}td|d|dd�S(u;
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.joined
    RHRBREujoined(RDRZ(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytjoinedqscC@s(t||�}td|d|dd�S(u8
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.not_joined
    RHRBREujoined(RDRd(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
not_joined�scC@s(t||�}td|d|dd�S(u<
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.allowed
    RHRBREuallowed(RDRZ(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytallowed�scC@s(t||�}td|d|dd�S(u9
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.not_allowed
    RHRBREuallowed(RDRd(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytnot_allowed�scC@s(t||�}td|d|dd�S(u;
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.alived
    RHRBREualived(RDRZ(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytalived�scC@s(t||�}td|d|dd�S(u8
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.not_alived
    RHRBREualived(RDRd(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
not_alived�scC@s(t||�}td|d|dd�S(u;
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are up according to Salt's presence
    detection (no commands will be sent to minions)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.reaped
    RHRBREureaped(RDRZ(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytreaped
scC@s(t||�}td|d|dd�S(u8
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2019.2.0
        The 'show_ipv4' argument has been renamed to 'show_ip' as it now
        includes IPv6 addresses for IPv6-connected minions.

    Print a list of all minions that are NOT up according to Salt's presence
    detection (no commands will be sent)

    subset : None
        Pass in a CIDR range to filter minions by IP address.

    show_ip : False
        Also show the IP address each minion is connecting from.

    CLI Example:

    .. code-block:: bash

        salt-run manage.not_reaped
    RHRBREureaped(RDRd(RHRBRC((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
not_reaped'suroadcC@s�td}tjj|�}|ddkr~t|d�}tjjjttdd|d|�}|jdd	d|�}nd
}|S(ug
    Print the stack stats

    estate : None
        The name of the target estate. Master stats would be requested by default

    stack : 'road'
        Show stats on either road or lane stack
        Allowed values are 'road' or 'lane'.

    CLI Example:

    .. code-block:: bash

        salt-run manage.get_stats [estate=alpha_minion] [stack=lane]
    u	conf_fileu	transporturaetustatsusock_dirRGtestateRFi<uNot implemented(	R
R
RIRJRR*RKt
StatsEventRM(RotstackRRRSRGRTtstats((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt	get_statsAs
(cC@std|dd�S(u�
    Print the estate road stack stats

    estate : None
        The name of the target estate. Master stats would be requested by default

    CLI Example:

    .. code-block:: bash

        salt-run manage.road_stats [estate=alpha_minion]
    RoRquroad(Rs(Ro((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
road_stats_s
cC@std|dd�S(u�
    Print the estate manor lane stack stats

    estate : None
        The name of the target estate. Master stats would be requested by default

    CLI Example:

    .. code-block:: bash

        salt-run manage.lane_stats [estate=alpha_minion]
    RoRqulane(Rs(Ro((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt
lane_statsos
cC@s�tjjt�}tjjjj�}|j|dd|�}i}xtj	|�D]�\}}t
j|�s}|||<n�|j|�}|j
di�}	|j
di�}
||	kr�||=qUne||
kr�dj|�||<nC|
||krdj||
|�||<ntjdd|g�||krU||=qUqUW|r�td	�xRtj	|�D]>\}}t|�td
t|��t|�td�qhWntjidjt|��d
6d�||fS(u�
    .. versionchanged:: 2017.7.0
        The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
        releases must use ``expr_form``.

    Accept a minion's public key after checking the fingerprint over salt-ssh

    CLI Example:

    .. code-block:: bash

        salt-run manage.safe_accept my_minion
        salt-run manage.safe_accept minion1,minion2 tgt_type=list
    u
key.fingerRuminionsuminions_preu$Minion key {0} not found by salt-keyu6Minion key {0} does not match the key in salt-key: {1}usalt-keyu-qyau,safe_accept failed on the following minions:u-uuAccepted {0:d} keysumessageuprogress(R
RVtKeyR
Rtssht	SSHClientR'RRtFINGERPRINT_REGEXR6tfingerR7tformatt
subprocesstcallR(tlent
__jid_event__t
fire_event(ttargetRtsalt_keyt
ssh_clientR$tfailuresR<Rztfingerprintstacceptedtpendingtmessage((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytsafe_accepts>



&cC@s�i}tjjtd�}y |jdddtd�}Wntk
r\}t|�|SXidd6dd	6d
d6dd
6dd6}i}tjj}x�|D]�}||s�t	}d}	n1tjj
j||�}tjj
j||�}	|	|kri||	<n|r"|j||	|<q�|||	|<q�W|j|d<xl|D]d}
|
dkro|d|||
<qHx:t||
�D](}||
||j||
i�|<q�WqHW|S(u{
    Check the version of active minions

    CLI Example:

    .. code-block:: bash

        salt-run manage.versions
    u	conf_fileu*utest.versionRutimeoutuMinion offlinei����uMinion requires updatei����u
Up to dateiuMinion newer than masteriuMasteri(R
RRR
R'RR(tversiont__saltstack_version__R)tSaltStackVersiontparseR*tcompattcmptstringRt
setdefault(R$RRNR0tlabelstversion_statustmaster_versionR<tminion_versiontver_diffRV((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyR@�sB
 



	


*udevelopuuflatu/tmp/.bootstraputornadoc
C@s�|dkrd}ntj�}
|dk	r:||
d<n|dk	rS||
d<n|dk	rl||
d<n|dk	r�||
d<nxg|jd�D]V}||
d<d|
d	<d
j|jd�tj��}tj	j
|d�}y�d
|dg|
d<tjj
j|
�j�d|dj|	�dj|�g|
d<tjj
j|
�j�}
ddj
d||g�dg|
d<tjj
j|
�j�d|g|
d<tjj
j|
�j�Wq�tk
r�}tjtj|��q�Xq�WdS(uJ	
    Bootstrap minions with salt-bootstrap

    version : develop
        Git tag of version to install

    script : https://bootstrap.saltstack.com
        URL containing the script to execute

    hosts
        Comma-separated hosts [example: hosts='host1.local,host2.local']. These
        hosts need to exist in the specified roster.

    script_args
        Any additional arguments that you want to pass to the script.

        .. versionadded:: 2016.11.0

    roster : flat
        The roster to use for Salt SSH. More information about roster files can
        be found in :ref:`Salt's Roster Documentation <ssh-roster>`.

        A full list of roster types, see the :ref:`builtin roster modules <all-salt.roster>`
        documentation.

        .. versionadded:: 2016.11.0

    ssh_user
        If ``user`` isn't found in the ``roster``, a default SSH user can be set here.
        Keep in mind that ``ssh_user`` will not override the roster ``user`` value if
        it is already defined.

        .. versionadded:: 2016.11.0

    ssh_password
        If ``passwd`` isn't found in the ``roster``, a default SSH password can be set
        here. Keep in mind that ``ssh_password`` will not override the roster ``passwd``
        value if it is already defined.

        .. versionadded:: 2016.11.0

    ssh_privkey
        If ``priv`` isn't found in the ``roster``, a default SSH private key can be set
        here. Keep in mind that ``ssh_password`` will not override the roster ``passwd``
        value if it is already defined.

        .. versionadded:: 2016.11.0

    tmp_dir : /tmp/.bootstrap
        The temporary directory to download the bootstrap script in. This
        directory will have ``-<uuid4>`` appended to it. For example:
        ``/tmp/.bootstrap-a19a728e-d40a-4801-aba9-d00655c143a7/``

        .. versionadded:: 2016.11.0

    http_backend : tornado
        The backend library to use to download the script. If you need to use
        a ``file:///`` URL, then you should set this to ``urllib2``.

        .. versionadded:: 2016.11.0


    CLI Example:

    .. code-block:: bash

        salt-run manage.bootstrap hosts='host1,host2'
        salt-run manage.bootstrap hosts='host1,host2' version='v0.17'
        salt-run manage.bootstrap hosts='host1,host2' version='v0.17'             script='https://bootstrap.saltstack.com/develop'

    uhttps://bootstrap.saltstack.comurosterussh_useru
ssh_passwdussh_privu,utgtuglobuselected_target_optionu{0}-{1}/u/u	deploy.shu
file.makedirsu	mode=0700uargvu
http.queryubackend={0}utext_out={0}ucmd.runu ushupython_shell=Falseufile.removeN(R?R
tcopytsplitR{trstriptuuidtuuid4R-R+RR
RRwtSSHtrunRRR/Rt	text_type(R�tscriptthoststscript_argstrostertssh_usertssh_passwordtssh_priv_keyttmp_dirthttp_backendtclient_optsthosttdeploy_commandRtexc((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt	bootstrap�s@R	





!
uwin32c	C@s|s-d}t|�j�}tjd�}	tg|	j|�D]0\}
}}}
|
||tj|
d�g^q@dtj	d�dt
�}|r�g|D]}|d|kr�|^q�}n|r�g|D]}|d|kr�|^q�}n|s�d	S|d
d}|d
d}||d
d
}nd}d}d
}|r[|dj|�7}nd}|dkr�|jd|d�}n|jd|d�}|j|||�}d}x�||f||ffD]n\}}|jd�}|d|d|d
d|dd|dj
|d�d|d|d7}q�Wtjdd�d}tjjj|d��}|j|�Wd QXxy|jd!�D]h}d"d#|g}|r�|d$|g7}|r�|d%|g7}q�n|d&d'|g7}tj|�q�Wd S((u#
    Bootstrap Windows minions via PsExec.

    hosts
        Comma separated list of hosts to deploy the Windows Salt minion.

    master
        Address of the Salt master passed as an argument to the installer.

    version
        Point release of installer to download. Defaults to the most recent.

    arch
        Architecture of installer to download. Defaults to win32.

    installer_url
        URL of minion installer executable. Defaults to the latest version from
        https://repo.saltstack.com/windows/

    username
        Optional user name for login on remote computer.

    password
        Password for optional username. If omitted, PsExec will prompt for one
        to be entered for each host.

    CLI Example:

    .. code-block:: bash

        salt-run manage.bootstrap_psexec hosts='host1,host2'
        salt-run manage.bootstrap_psexec hosts='host1,host2' version='0.17' username='DOMAIN\Administrator'
        salt-run manage.bootstrap_psexec hosts='host1,host2' installer_url='http://exampledomain/salt-installer.exe'
    u#https://repo.saltstack.com/windows/uG>(Salt-Minion-(.+?)-(.+)-Setup.exe)</a></td><td align="right">(.*?)\s*<u%d-%b-%Y %H:%MRVitreverseiii����iu	strFileURL = "{0}"
strHDLocation = "{1}"
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
End if
Set objXMLHTTP = Nothing
Set objShell = CreateObject("WScript.Shell")
objShell.Exec("{1}{2}")usaltinstall.exeu /S /minion-name=%COMPUTERNAME%u /master={0}uvcredist.exeuAMD64ubhttp://download.microsoft.com/download/d/2/4/d242c3fb-da5a-4542-ad66-f9661d0a8d19/vcredist_x64.exeu /qubhttp://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exeuPcd /d %TEMP%
net stop salt-minion
del c:\salt\conf\pki\minion\minion_master.pub
u
u
del u
@echo u  >u.vbs
@echo u  >>u.vbs
cscript.exe /NoLogo u.vbstsuffixu.batuwbNu,upsexecu\\u-uu-pu-hu-c(t_urlopentreadtretcompileRtfindallttimetstrptimetoperatort
itemgetterRR{R�RttempfiletmkstempR
R*R2tfopentwriteR|R}(R�tmasterR�tarcht
installer_urltusernametpasswordtbase_urltsourcetsalty_rxR+tvertplattdatetsource_listtst	vb_scripttvb_saltexectvb_saltexec_argstvb_vcrunexectvb_vcruntvb_salttbatchtxtytvb_linest
batch_patht
batch_fileR�targv((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pytbootstrap_psexecms`%C,,	
%T(Ct__doc__t
__future__RRRR-R�R�R|R�R�tloggingR�tsalt.extRt!salt.ext.six.moves.urllib.requestRR�tsalt.keyR
tsalt.utils.compattsalt.utils.filestsalt.utils.minionstsalt.utils.pathtsalt.utils.raeteventtsalt.clienttsalt.client.ssht
salt.wheeltsalt.versiontsalt.utils.eventRtsalt.exceptionsRRR�Ryt	getLoggert__name__RR"RR?R&R5R)R=R>RDRZRdReRfRgRhRiRjRkRlRmRnRsRtRuR�R@R�R�(((s7/usr/lib/python2.7/site-packages/salt/runners/manage.pyt<module>sx	 	4	2/8	9t

Zerion Mini Shell 1.0