�
�Udac @` s� d Z d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d
Z d Z
d d l Z d d
l m
Z
d d l m Z d d l j j Z d d l m Z e j � Z d e f d � � YZ d � Z e d k r� e � n d S( s8
create Autosupport module to enable, disable or modify
i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bysp
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- "Create/Delete Unix user group"
extends_documentation_fragment:
- netapp.na_ontap
module: na_ontap_unix_group
options:
state:
description:
- Whether the specified group should exist or not.
choices: ['present', 'absent']
default: 'present'
name:
description:
- Specifies UNIX group's name, unique for each group.
- Non-modifiable.
required: true
id:
description:
- Specifies an identification number for the UNIX group.
- Group ID is unique for each UNIX group.
- Required for create, modifiable.
vserver:
description:
- Specifies the Vserver for the UNIX group.
- Non-modifiable.
required: true
skip_name_validation:
description:
- Specifies if group name validation is skipped.
type: bool
users:
description:
- Specifies the users associated with this group. Should be comma separated.
- It represents the expected state of a list of users at any time.
- Add a user into group if it is specified in expected state but not in current state.
- Delete a user from group if it is specified in current state but not in expected state.
- To delete all current users, use '' as value.
type: list
version_added: "2.9"
short_description: NetApp ONTAP UNIX Group
version_added: "2.8"
sc
- name: Create UNIX group
na_ontap_unix_group:
state: present
name: SampleGroup
vserver: ansibleVServer
id: 2
users: user1,user2
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Delete all users in UNIX group
na_ontap_unix_group:
state: present
name: SampleGroup
vserver: ansibleVServer
users: ''
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Delete UNIX group
na_ontap_unix_group:
state: absent
name: SampleGroup
vserver: ansibleVServer
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
t
N( t
AnsibleModule( t to_native( t NetAppModulet NetAppOntapUnixGroupc B` s_ e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z RS(
s1
Common operations to manage UNIX groups
c C` sC t j � | _ | j j t d t d t d d d g d d � d t d t d d � d
t d t d d � d t d t d d
� d t d t d d � d t d t d d � � � t d | j d t � | _ t � | _
| j
j | j j � | _
| j � t t k r| j j d d � n% t j d | j d | j
d � | _ d S( Nt statet requiredt choicest presentt absentt defaultt namet typet strt idt intt skip_name_validationt boolt vservert userst listt
argument_spect supports_check_modet msgs( the python NetApp-Lib module is requiredt module( t netapp_utilst na_ontap_host_argument_specR t updatet dictt Falset TrueR R R t na_helpert set_parameterst paramst
parameterst set_playbook_zapi_key_mapt HAS_NETAPP_LIBt fail_jsont setup_na_ontap_zapit server( t self( ( sV /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_unix_group.pyt __init__w s"