�
�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 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( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys
module: na_ontap_export_policy_rule
short_description: NetApp ONTAP manage export policy rules
extends_documentation_fragment:
- netapp.na_ontap
version_added: '2.6'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Create or delete or modify export rules in ONTAP
options:
state:
description:
- Whether the specified export policy rule should exist or not.
required: false
choices: ['present', 'absent']
default: present
name:
description:
- The name of the export rule to manage.
required: True
aliases:
- policy_name
client_match:
description:
- List of Client Match host names, IP Addresses, Netgroups, or Domains
- If rule_index is not provided, client_match is used as a key to fetch current rule to determine create,delete,modify actions.
If a rule with provided client_match exists, a new rule will not be created, but the existing rule will be modified or deleted.
If a rule with provided client_match doesn't exist, a new rule will be created if state is present.
ro_rule:
description:
- List of Read only access specifications for the rule
choices: ['any','none','never','krb5','krb5i','krb5p','ntlm','sys']
rw_rule:
description:
- List of Read Write access specifications for the rule
choices: ['any','none','never','krb5','krb5i','krb5p','ntlm','sys']
super_user_security:
description:
- List of Read Write access specifications for the rule
choices: ['any','none','never','krb5','krb5i','krb5p','ntlm','sys']
allow_suid:
description:
- If 'true', NFS server will honor SetUID bits in SETATTR operation. Default value on creation is 'true'
type: bool
protocol:
description:
- List of Client access protocols.
- Default value is set to 'any' during create.
choices: [any,nfs,nfs3,nfs4,cifs,flexcache]
rule_index:
description:
- rule index of the export policy
vserver:
description:
- Name of the vserver to use.
required: true
sn
- name: Create ExportPolicyRule
na_ontap_export_policy_rule:
state: present
name: default123
vserver: ci_dev
client_match: 0.0.0.0/0,1.1.1.0/24
ro_rule: krb5,krb5i
rw_rule: any
protocol: nfs,nfs3
super_user_security: any
allow_suid: true
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify ExportPolicyRule
na_ontap_export_policy_rule:
state: present
name: default123
rule_index: 100
client_match: 0.0.0.0/0
ro_rule: ntlm
rw_rule: any
protocol: any
allow_suid: false
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Delete ExportPolicyRule
na_ontap_export_policy_rule:
state: absent
name: default123
rule_index: 100
vserver: ci_dev
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
s
N( t
AnsibleModule( t to_native( t NetAppModulet NetAppontapExportRulec B` sz e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z d
� Z d � Z
d � Z RS(
s% object initialize and class methods c C` s0 t j � | _ | j j t d t d t d d d d d g d d � d t d t d d d
d g � d t d t d d
d d d d d d d d d g � d t d t d d
� d t d t d d
d d d d d d d d d d d g � d t d t d d
d d d d d d d d d d d g � d t d t d d
d d d d d d d d d d d g � d t d t d d � d! t d t d d"