| 1 |
[](https://docs.ansible.com/ansible/devel/collections/netapp/ontap/index.html) |
| 2 |
 |
| 3 |
[](https://codecov.io/gh/ansible-collections/netapp.ontap) |
| 4 |
[](https://discord.gg/NetApp) |
| 5 |
|
| 6 |
============================================================= |
| 7 |
|
| 8 |
netapp.ontap |
| 9 |
|
| 10 |
NetApp ONTAP Collection |
| 11 |
|
| 12 |
Copyright (c) 2025 NetApp, Inc. All rights reserved. |
| 13 |
Specifications subject to change without notice. |
| 14 |
|
| 15 |
============================================================= |
| 16 |
|
| 17 |
# Installation |
| 18 |
```bash |
| 19 |
ansible-galaxy collection install netapp.ontap |
| 20 |
``` |
| 21 |
To use this collection, add the following to the top of your playbook, without this you will be using Ansible 2.9 version of the module |
| 22 |
``` |
| 23 |
collections: |
| 24 |
- netapp.ontap |
| 25 |
``` |
| 26 |
# Requirements |
| 27 |
- ansible-core >= 2.16 |
| 28 |
- requests >= 2.20 |
| 29 |
- netapp-lib version >= 2018.11.13 (For ZAPI) |
| 30 |
|
| 31 |
# Module documentation |
| 32 |
https://docs.ansible.com/ansible/devel/collections/netapp/ontap/ |
| 33 |
|
| 34 |
# Deprecation warning |
| 35 |
The 'netapp-lib' library is no longer maintained. Proceed at your own risk when using ZAPI. |
| 36 |
Please refer to [CPC](https://mysupport.netapp.com/info/communications/ECMLP2880232.html) to stay updated with ONTAPI (ZAPI) End-of-Availability announcement. |
| 37 |
|
| 38 |
### Mapping of ZAPI-Only Modules to their RESTful Equivalents |
| 39 |
A mapping between ZAPI-only modules and their RESTful equivalents is provided below. |
| 40 |
Use this as a reference when migrating playbooks to ensure compatibility with REST APIs, as REST modules may return data in a different format and offer additional features not available in ZAPI. |
| 41 |
- na_ontap_broadcast_domain_ports -> na_ontap_ports |
| 42 |
- na_ontap_command -> na_ontap_rest_cli |
| 43 |
- na_ontap_firewall_policy -> na_ontap_service_policy |
| 44 |
- na_ontap_info -> na_ontap_rest_info |
| 45 |
- na_ontap_ldap -> na_ontap_ldap_client |
| 46 |
- na_ontap_motd -> na_ontap_login_messages |
| 47 |
- na_ontap_ntfs_dacl -> na_ontap_file_security_permissions |
| 48 |
- na_ontap_ntfs_sd -> na_ontap_file_security_permissions |
| 49 |
- na_ontap_qos_adaptive_policy_group -> na_ontap_qos_policy_group |
| 50 |
- na_ontap_volume_snaplock -> na_ontap_volume |
| 51 |
- na_ontap_vserver_cifs_security -> na_ontap_cifs_server |
| 52 |
- na_ontap_zapit -> na_ontap_restit |
| 53 |
|
| 54 |
### ZAPI-only Modules |
| 55 |
The following modules do not have REST equivalent APIs. |
| 56 |
- na_ontap_file_directory_policy |
| 57 |
- na_ontap_quota_policy |
| 58 |
- na_ontap_svm_options |
| 59 |
|
| 60 |
# Support |
| 61 |
Certain modules and options in the collection are only available from specific versions of ONTAP. The versions that a module or option supports are documented in the individual module documentation. |
| 62 |
|
| 63 |
## AWS FSx for NetApp ONTAP |
| 64 |
**Note:** Each module's documentation indicates whether it supports AWS FSx for NetApp ONTAP functionality. |
| 65 |
|
| 66 |
Please find below an example for using Lambda proxy functionality. |
| 67 |
```yaml |
| 68 |
--- |
| 69 |
- name: Manage volume using Lambda Proxy |
| 70 |
hosts: localhost |
| 71 |
gather_facts: false |
| 72 |
|
| 73 |
vars: |
| 74 |
# ONTAP and Lambda configuration |
| 75 |
ontap_config: |
| 76 |
hostname: "hostname" |
| 77 |
username: "user" |
| 78 |
password: "password" |
| 79 |
use_lambda: true |
| 80 |
lambda_config: |
| 81 |
function_name: "netapp-ontap-automation" |
| 82 |
aws_region: "us-east-1" |
| 83 |
aws_profile: "default" # Optional |
| 84 |
|
| 85 |
tasks: |
| 86 |
- name: Create a volume |
| 87 |
netapp.ontap.na_ontap_volume: |
| 88 |
hostname: "{{ ontap_config.hostname }}" |
| 89 |
username: "{{ ontap_config.username }}" |
| 90 |
password: "{{ ontap_config.password }}" |
| 91 |
use_lambda: "{{ ontap_config.use_lambda }}" |
| 92 |
lambda_config: "{{ ontap_config.lambda_config }}" |
| 93 |
name: test_volume |
| 94 |
vserver: test_svm |
| 95 |
size: 20 |
| 96 |
size_unit: mb |
| 97 |
aggregate_name: test_aggr |
| 98 |
state: present |
| 99 |
use_rest: always |
| 100 |
register: volume_create_result |
| 101 |
``` |
| 102 |
|
| 103 |
## NetApp ONTAP ASA r2 |
| 104 |
The following modules support NetApp ONTAP ASA r2 systems. Please refer to the individual module documentation for any platform-specific behavior and minimum ONTAP version requirements. |
| 105 |
|
| 106 |
- na_ontap_lun |
| 107 |
- na_ontap_lun_map |
| 108 |
- na_ontap_lun_map_reporting_nodes |
| 109 |
- na_ontap_nvme_namespace |
| 110 |
- na_ontap_nvme_subsystem |
| 111 |
- na_ontap_storage_unit |
| 112 |
- na_ontap_storage_unit_snapshot |
| 113 |
|
| 114 |
### Need help |
| 115 |
Join our [Discord](https://discord.gg/NetApp) and look for our #ansible channel. |
| 116 |
|
| 117 |
# Release Notes |
| 118 |
Please refer to [CHANGELOG.md](https://github.com/ansible-collections/netapp.ontap/blob/main/CHANGELOG.md) for release notes. |
| 119 |
|
| 120 |
# Related Information |
| 121 |
For debugging connectivity issues or for tracing API calls, please refer to [this page](https://github.com/ansible-collections/netapp.ontap/wiki/Debugging). |
| 122 |
|
| 123 |
For creating any new issues or enhancements, please visit [this page](https://github.com/ansible-collections/netapp.ontap/issues/new/choose). |
| 124 |
|
| 125 |
# License Information |
| 126 |
GNU General Public License v3.0 |
| 127 |
See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. |