Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
local
/
lib
/
python3.10
/
dist-packages
/
ansible
/
modules
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: group.cpython-310.pyc
o O�h�Q � @ s d dl mZ dZdZdZd dlZd dlZd dlmZ d dl m Z d dlmZ G d d � d e �ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Zdd � Zed!kr�e� dS dS )"� )�annotationsa� --- 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 force: description: - Whether to delete a group even if it is the primary group of a user. - Only applicable on platforms which implement a --force flag on the group deletion command. type: bool default: false version_added: "2.15" system: description: - If V(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 O(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 O(state) is C(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 O(state) is C(present) type: bool sample: False N)�to_bytes)� AnsibleModule)�get_platform_subclassc sl e Zd ZdZdZdZdZ� fdd�Zdd� Zd d � Z dd� Z d d� Zdd� Zdd� Z dd� Zdd� Z� ZS )�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 s t t�}t| |��|�S �N)r r �super�__new__)�cls�args�kwargs�new_cls�� __class__� �@/usr/local/lib/python3.10/dist-packages/ansible/modules/group.pyr � s z Group.__new__c C s^ || _ |jd | _|jd | _|jd | _|jd | _|jd | _|jd | _|jd | _d S )N�state�name�force�gid�system�local� non_unique) �module�paramsr r r r r r r )�selfr r r r �__init__� s zGroup.__init__c C s | j �|�S r )r �run_command�r �cmdr r r �execute_command� s zGroup.execute_commandc C s. | j rd}nd}| j�|d�| jg}| �|�S )N� lgroupdel�groupdelT)r r �get_bin_pathr r"