Not sure if this is the best way to do it you can make an API call to the OnTap system to get the export policy name.
---
- hosts: localhost
tasks:
- name: Get NetApp UUID of Volume
uri:
url: https://cluster_name/api/storage/volumes?name=volume_name&fields=nas.export_policy.name&return_records=true&return_timeout=15
url_username: username
url_password: password
method: GET
force_basic_auth: yes
validate_certs: no
register: vol_export_policy
- name: Set export policy fact
set_fact:
export_policy: "{{ vol_export_policy.json.records[0].nas.export_policy.name }}"