Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.11/site-packages/ansible/modules/__pycache__/ |
Upload File : |
� ���cHN � � � d dl mZmZmZ eZdZdZdZd dl Z d dl Z d dlmZ d dl mZ d dlmZ G d � d e� � Z G d� de� � Z G d � de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de� � Zd� Zedk r e� � dS dS )� )�absolute_import�division�print_functionab --- module: group version_added: "0.0.2" short_description: Add or remove groups requirements: - groupadd - groupdel - groupmod description: - Manage presence of groups on a host. - For Windows targets, use the M(ansible.windows.win_group) module instead. options: name: description: - Name of the group to manage. type: str required: true gid: description: - Optional I(GID) to set for the group. type: int state: description: - Whether the group should be present or not on the remote host. type: str choices: [ absent, present ] default: present system: description: - If I(yes), indicates that the group created is a system group. type: bool default: no local: description: - Forces the use of "local" command alternatives on platforms that implement it. - This is useful in environments that use centralized authentication when you want to manipulate the local groups. (for example, it uses C(lgroupadd) instead of C(groupadd)). - This requires that these commands exist on the targeted host, otherwise it will be a fatal error. type: bool default: no version_added: "2.6" non_unique: description: - This option allows to change the group ID to a non-unique value. Requires C(gid). - Not supported on macOS or BusyBox distributions. type: bool default: no version_added: "2.8" extends_documentation_fragment: action_common_attributes attributes: check_mode: support: full diff_mode: support: none platform: platforms: posix seealso: - module: ansible.builtin.user - module: ansible.windows.win_group author: - Stephen Fromm (@sfromm) z� - name: Ensure group "somegroup" exists ansible.builtin.group: name: somegroup state: present - name: Ensure group "docker" exists with correct gid ansible.builtin.group: name: docker state: present gid: 1750 a� gid: description: Group ID of the group. returned: When C(state) is 'present' type: int sample: 1001 name: description: Group name. returned: always type: str sample: users state: description: Whether the group is present or not. returned: always type: str sample: 'absent' system: description: Whether the group is a system group or not. returned: When C(state) is 'present' type: bool sample: False N)�to_bytes)� AnsibleModule)�get_platform_subclassc �^ � � e Zd ZdZdZdZdZ� fd�Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Z� xZS )�Groupa- This is a generic Group manipulation class that is subclassed based on platform. A subclass may wish to override the following action methods:- - group_del() - group_add() - group_mod() All subclasses MUST define platform and distribution (which may be None). �GenericN� /etc/groupc �r �� t t � � }t | |� � � |� � S �N)r r �super�__new__)�cls�args�kwargs�new_cls� __class__s ��:/usr/lib/python3.11/site-packages/ansible/modules/group.pyr z Group.__new__� s. �� �'��.�.���S�'�"�"�*�*�7�3�3�3� c �� � || _ |j d | _ |j d | _ |j d | _ |j d | _ |j d | _ |j d | _ d S )N�state�name�gid�system�local� non_unique)�module�paramsr r r r r r )�selfr s r �__init__zGroup.__init__� sa � �����]�7�+�� ��M�&�)�� ��=��'����m�H�-����]�7�+�� � �-��5����r c �6 � | j � |� � S r )r �run_command�r! �cmds r �execute_commandzGroup.execute_command� s � ��{�&�&�s�+�+�+r c � � | j rd}nd}| j � |d� � | j g}| � |� � S )N� lgroupdel�groupdelT)r r �get_bin_pathr r'