File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/solaris_group.cpython-310.pyc
Back
o ;j � @ sz d Z ddlZddlZe�e�ZzddlZW n ey Y nw dZ dd� Z ddd�Zdd � Zd d� Z dd d�Zdd� ZdS )a Manage groups on Solaris .. important:: If you feel that Salt should be using this module to manage groups on a minion, and it is using a different module (or gives an error similar to *'group.info' is not available*), see :ref:`here <module-provider-override>`. � N�groupc C s t d dkrtS dS )z5 Set the group module if the kernel is SunOS Zkernel�SunOS)FzUThe solaris_group execution module failed to load: only available on Solaris systems.)Z __grains__�__virtualname__� r r �N/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/solaris_group.py�__virtual__ s r c K sh t jj�|�dd��rt�d� |rt�d� d}|r#|d|� d�7 }|| 7 }td |dd �}|d S )zr Add the specified group CLI Example: .. code-block:: bash salt '*' group.add foo 3456 �systemFz;solaris_group module does not support the 'system' argumentz"Invalid kwargs passed to group.addz groupadd z-g � �cmd.run_all�Zpython_shell�retcode)�salt�utils�dataZis_true�pop�log�warning�__salt__)�name�gid�kwargs�cmd�retr r r �add( s r c C s t d d| � �dd�}|d S )zo Remove the named group CLI Example: .. code-block:: bash salt '*' group.delete foo r z groupdel Fr r �r )r r r r r �deleteA s r c C s<