#Ansible script to create snapshot for all netapp volume
1 messages · Page 1 of 1 (latest)
can you share the playbook and error you are getting
you can find the examples here
https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_snapshot_module.html#examples
Thank you for the reply @radiant whale . Here is the code and error message
- name: create SnapShot
tags:- create
netapp.ontap.na_ontap_snapshot:
state: present
snapshot: "{{ Before_snapshot }}"
volume: "{{ snap_test. }}"
comment: "i am a comment"
- create
expiry_time: "2022-02-04T14:00:00-05:00"
vserver: "{{ name }}"
username: "{{ username }}"
password: "{{ password }}"
hostname: "{{ hostname of netapp }}"
ERROR! 'netapp.ontap.na_ontap_snapshot' is not a valid attribute for a Play
The error appears to be in '/etc/ansible/playbooks/***/name of file.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: create SnapShot
^ here
<@&895299822712659999> and <@&855071026954371088> - For better visibility
Please don't bulk tag like that. Community Leads/Mgrs are not ansible experts. Posting in here was enough, and we have a lot of folks in here that can help. Please be patient with us. 🙂