HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/chef.cpython-310.pyc
o

�N�g
�@s@dZddlZdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�ZdS)az
Execute Chef client runs
=====================================================================

Run chef-client or chef-solo

.. code-block:: yaml

    my-chef-run:
      chef.client:
        - override-runlist: 'demo1,demo2'
        - server: 'https://chef.domain.com'

    default-chef-run:
      chef.client: []

    my-solo-run:
      chef.solo:
        - environment: dev
�NcCsdtvrdSdS)z:
    Only load if Chef execution module is available.
    �chef.clientT)Fzchef module could not be loaded)�__salt__�rr�D/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/chef.py�__virtual__srcK�t|d|�S)a0
    name
        Unique identifier for the state. Does not affect the Chef run.

    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
    r��_run��name�kwargsrrr�client"s:r
cKr)a^
    name
        Unique identifier for the state. Does not affect the Chef run.

    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

    z	chef.solorr
rrr�solo_s)rcCs�|iddd�}t|ddtdi|��}|ddkr:t|d�r5t|d�|dd	<tds0d
nd|d<n	d
|d<nd|d<d
�|d|dg�|d<|S)N�)r�changes�result�commentZwhyrun�test�retcoder�stdoutrZsummaryTrF�
�stderrrr)rZ__opts__�_has_changes�_summary�join)r�modr�retrrrrr	�s
r	cCs|��dS)N���)�
splitlines)rrrrr�srcCs&t�dt|�tj�}t|�d��dkS)NzM(Chef Client finished|Chef Infra Client finished|Infra Phase complete), (\d+)�r)�re�searchr�
IGNORECASE�int�group)rZregexrrrr�s�r)�__doc__r rr
rr	rrrrrr�<module>s	=,