�
�Udac @` s� 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 m Z d d l j j Z e j � Z d e f d � � YZ d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys<
module: na_ontap_user_role
short_description: NetApp ONTAP user role configuration and management
extends_documentation_fragment:
- netapp.na_ontap
version_added: '2.6'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Create or destroy user roles
options:
state:
description:
- Whether the specified user should exist or not.
choices: ['present', 'absent']
default: present
name:
description:
- The name of the role to manage.
required: true
command_directory_name:
description:
- The command or command directory to which the role has an access.
required: true
access_level:
description:
- The name of the role to manage.
choices: ['none', 'readonly', 'all']
default: all
query:
description:
- A query for the role. The query must apply to the specified command or directory name.
- Use double quotes "" for modifying a existing query to none.
version_added: '2.8'
vserver:
description:
- The name of the vserver to use.
required: true
s�
- name: Create User Role
na_ontap_user_role:
state: present
name: ansibleRole
command_directory_name: volume
access_level: none
query: show
vserver: ansibleVServer
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify User Role
na_ontap_user_role:
state: present
name: ansibleRole
command_directory_name: volume
access_level: none
query: ""
vserver: ansibleVServer
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
s
N( t
AnsibleModule( t to_native( t NetAppModulet NetAppOntapUserRolec B` sG e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C` sN 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 d d d
d d g � d t d t d d � d t d t d d � � � t d | j d t � | _ t � | _
| 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 command_directory_namet access_levelt allt nonet readonlyt vservert queryt
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 HAS_NETAPP_LIBt fail_jsont setup_na_ontap_zapit server( t self( ( sU /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_user_role.pyt __init__m s"