%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/modules/ |
Current File : //usr/lib/python2.7/site-packages/salt/modules/chef.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z e j e � Z d � Z d � Z e j j j j d � e e d d � � Z e j j j j d � e d d � � Z d � Z d S( u% Execute chef in server or solo mode i ( t absolute_importt print_functiont unicode_literalsN( t sixc C@ s# t j j j d � s t d f St S( u( Only load if chef is installed u chef-clientu. Cannot load chef module: chef-client not found( t saltt utilst patht whicht Falset True( ( ( s5 /usr/lib/python2.7/site-packages/salt/modules/chef.pyt __virtual__ s c C@ s� t j j j � r� t j j t d d � } t j j | � sM t j | � n t j d | d | d d d t � } | j } | j � n! t j j j d d j | � � } | S( u# Retrieve the logfile name u cachediru tmpt dirt prefixt suffixu .logt deleteu /var/logu {0}.log( R R t platformt is_windowst osR t joint __opts__t isdirt mkdirt tempfilet NamedTemporaryFileR t namet closet format( t exe_namet tmp_dirt logfile_tmpt logfile( ( s5 /usr/lib/python2.7/site-packages/salt/modules/chef.pyt _default_logfile s u chef-clientc K@ sr | d k r t d � } n d d d d j | � d g } | rO | j d � n | re | j d � n t | | � 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 u chef-clientu --no-coloru --onceu --logfile "{0}"u --format docu --why-runu --local-modeN( t NoneR R t appendt _exec_cmd( t whyrunt localmodeR t kwargst args( ( s5 /usr/lib/python2.7/site-packages/salt/modules/chef.pyt client7 s H u chef-soloc K@ sY | d k r t d � } n d d d j | � d g } | rL | j d � n t | | � 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 R R R! R"