File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ssh_service.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlZddlZddlZddlZe�e�ZddiZ dZ dd� Zdd � Zd d� Z ddd�Zdd d�Zddd�Zddd�Zddd�Zddd�ZdS )zW Provide the service module for the proxy-minion SSH sample .. versionadded:: 2015.8.2 � N�list_�list�servicec C sD zt jj�� rtd d dkrtW S W dS W dS ty! Y dS w )z6 Only work on systems that are a proxy minion �proxyZ proxytypeZ ssh_sample)FzOThe ssh_service execution module failed to load. Check the proxy key in pillar.)FzZThe ssh_service execution module failed to load: only works on an ssh_sample proxy minion.)�salt�utils�platformZis_proxyZ__opts__�__virtualname__�KeyError� r r �L/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/ssh_service.py�__virtual__ s ��� ��r c C s d} t | � S )z Return a list of all available services CLI Example: .. code-block:: bash salt '*' service.get_all zssh_sample.service_list�� __proxy__)�proxy_fnr r r �get_all, s r c C s t � S )z} Return a list of all available services. CLI Example: .. code-block:: bash salt '*' service.list )r r r r r r : s c C � d}t | | �S )z� Start the specified service on the ssh_sample CLI Example: .. code-block:: bash salt '*' service.start <service name> zssh_sample.service_startr ��name�sigr r r r �startG � r c C r )z� Stop the specified service on the rest_sample CLI Example: .. code-block:: bash salt '*' service.stop <service name> zssh_sample.service_stopr r r r r �stopV s r c C r )z� Restart the specified service with rest_sample CLI Example: .. code-block:: bash salt '*' service.restart <service name> zssh_sample.service_restartr r r r r �restartd r r c C sv d}t t�d| ��}|rt�t� | �}n| g}i }|D ]}t| |�}|d dkr.d||<