�
�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 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_vscan_on_access_policy
short_description: NetApp ONTAP Vscan on access policy configuration.
extends_documentation_fragment:
- netapp.na_ontap
version_added: '2.8'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Configure on access policy for Vscan (virus scan)
options:
state:
description:
- Whether a Vscan on Access policy is present or not
choices: ['present', 'absent']
default: present
vserver:
description:
- the name of the data vserver to use.
required: true
policy_name:
description:
- The name of the policy
required: true
file_ext_to_exclude:
description:
- File extensions for which On-Access scanning must not be performed.
file_ext_to_include:
description:
- File extensions for which On-Access scanning is considered. The default value is '*', which means that all files are considered for scanning except
- those which are excluded from scanning.
filters:
description:
- A list of filters which can be used to define the scope of the On-Access policy more precisely. The filters can be added in any order. Possible values
- scan_ro_volume Enable scans for read-only volume,
- scan_execute_access Scan only files opened with execute-access (CIFS only)
is_scan_mandatory:
description:
- Specifies whether access to a file is allowed if there are no external virus-scanning servers available for virus scanning. It is true if not provided at
the time of creating a policy.
type: bool
max_file_size:
description:
- Max file-size (in bytes) allowed for scanning. The default value of 2147483648 (2GB) is taken if not provided at the time of creating a policy.
paths_to_exclude:
description:
- File paths for which On-Access scanning must not be performed.
scan_files_with_no_ext:
description:
- Specifies whether files without any extension are considered for scanning or not.
default: True
s�
- name: Create Vscan On Access Policy
na_ontap_vscan_on_access_policy:
state: present
username: '{{ netapp_username }}'
password: '{{ netapp_password }}'
hostname: '{{ netapp_hostname }}'
vserver: carchi-vsim2
policy_name: carchi_policy
file_ext_to_exclude: ['exe', 'yml']
- name: modify Vscan on Access Policy
na_ontap_vscan_on_access_policy:
state: present
username: '{{ netapp_username }}'
password: '{{ netapp_password }}'
hostname: '{{ netapp_hostname }}'
vserver: carchi-vsim2
policy_name: carchi_policy
file_ext_to_exclude: ['exe', 'yml', 'py']
- name: Delete On Access Policy
na_ontap_vscan_on_access_policy:
state: absent
username: '{{ netapp_username }}'
password: '{{ netapp_password }}'
hostname: '{{ netapp_hostname }}'
vserver: carchi-vsim2
policy_name: carchi_policy
s
N( t
AnsibleModule( t to_nativet NetAppOntapVscanOnAccessPolicyc B` sk e Z d Z d � Z d d � Z d � Z d � Z d � Z d � Z d � Z
d � Z d � Z d
� Z
RS( s6
Create/Modify/Delete a Vscan OnAccess policy
c C` s� t j � | _ | j j 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 � d t d t d d d t � d t d t d d � d t d t d d � d t d t d t d t � �
� t d | j d t � | _ | j j
} | d | _ | d | _ | d
| _
| d | _ | d
| _ | d | _ | d | _ | d | _ | d | _ | d | _ t t k r�| j j d d � n! t j d | j d | j � | _ d S( Nt statet choicest presentt absentt defaultt vservert requiredt typet strt policy_namet file_ext_to_excludet listt file_ext_to_includet filterst is_scan_mandatoryt boolt
max_file_sizet intt paths_to_excludet scan_files_with_no_extt
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 Truet FalseR R R"