%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/chef.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddlZ	ddl
Z	ddlZ	ddlm
Z
eje�Zd�Zd�Ze	jjjjd�eedd��Ze	jjjjd	�edd
��Zd�ZdS(u%
Execute chef in server or solo mode
i(tabsolute_importtprint_functiontunicode_literalsN(tsixcC@s#tjjjd�stdfStS(u(
    Only load if chef is installed
    uchef-clientu.Cannot load chef module: chef-client not found(tsalttutilstpathtwhichtFalsetTrue(((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pyt__virtual__s
c	C@s�tjjj�r�tjjtdd�}tjj|�sMtj	|�nt
jd|d|dddt�}|j
}|j�n!tjjjdd	j|��}|S(
u#
    Retrieve the logfile name
    ucachedirutmptdirtprefixtsuffixu.logtdeleteu/var/logu{0}.log(RRtplatformt
is_windowstosRtjoint__opts__tisdirtmkdirttempfiletNamedTemporaryFileRtnametclosetformat(texe_namettmp_dirtlogfile_tmptlogfile((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pyt_default_logfile s		
uchef-clientcK@sr|dkrtd�}nddddj|�dg}|rO|jd�n|re|jd�nt||�S(	u�
    Execute a chef client run and return a dict with the stderr, stdout,
    return code, and pid.

    CLI Example:

    .. code-block:: bash

        salt '*' chef.client server=https://localhost

    server
        The chef server URL

    client_key
        Set the client key file location

    config
        The configuration file to use

    config-file-jail
        Directory under which config files are allowed to be loaded
        (no client.rb or knife.rb outside this path will be loaded).

    environment
        Set the Chef Environment on the node

    group
        Group to set privilege to

    json-attributes
        Load attributes from a JSON file or URL

    localmode
        Point chef-client at local repository if True

    log_level
        Set the log level (debug, info, warn, error, fatal)

    logfile
        Set the log file location

    node-name
        The node name for this client

    override-runlist
        Replace current run list with specified items for a single run

    pid
        Set the PID file location, defaults to /tmp/chef-client.pid

    run-lock-timeout
        Set maximum duration to wait for another client run to finish,
        default is indefinitely.

    runlist
        Permanently replace current run list with specified items

    user
        User to set privilege to

    validation_key
        Set the validation key file location, used for registering new clients

    whyrun
        Enable whyrun mode when set to True

    uchef-clientu
--no-coloru--onceu--logfile "{0}"u--format docu	--why-runu--local-modeN(tNoneRRtappendt	_exec_cmd(twhyrunt	localmodeRtkwargstargs((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pytclient7sH	u	chef-solocK@sY|dkrtd�}ndddj|�dg}|rL|jd�nt||�S(u
    Execute a chef solo run and return a dict with the stderr, stdout,
    return code, and pid.

    CLI Example:

    .. code-block:: bash

        salt '*' chef.solo override-runlist=test

    config
        The configuration file to use

    environment
        Set the Chef Environment on the node

    group
        Group to set privilege to

    json-attributes
        Load attributes from a JSON file or URL

    log_level
        Set the log level (debug, info, warn, error, fatal)

    logfile
        Set the log file location

    node-name
        The node name for this client

    override-runlist
        Replace current run list with specified items for a single run

    recipe-url
        Pull down a remote gzipped tarball of recipes and untar it to
        the cookbook cache

    run-lock-timeout
        Set maximum duration to wait for another client run to finish,
        default is indefinitely.

    user
        User to set privilege to

    whyrun
        Enable whyrun mode when set to True
    u	chef-solou
--no-coloru--logfile "{0}"u--format docu	--why-runN(R RRR!R"(R#RR%R&((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pytsolo�s4	cO@s�dj|�}djgtj|�D]-\}}|jd�s%dj||�^q%�}dj||�}tjdj|��td|dt�S(	Nu uu__u
 --{0} {1}u{0}{1}uChef command: {0}ucmd.run_alltpython_shell(	RRt	iteritemst
startswithRtlogtdebugt__salt__R(R&R%tcmd_argstktvt
cmd_kwargstcmd_exec((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pyR"�sC(t__doc__t
__future__RRRtloggingRRtsalt.utils.pathRtsalt.utils.platformtsalt.utils.decorators.pathtsalt.extRt	getLoggert__name__R,R
RRt
decoratorsRRRR R'R(R"(((s5/usr/lib/python2.7/site-packages/salt/modules/chef.pyt<module>s&			V?

Zerion Mini Shell 1.0