#Ansible script to create snapshot for all netapp volume

1 messages · Page 1 of 1 (latest)

slender steeple
#

I tried creating the ansible script to take snapshot for all volumes but it is erroring out can someone help me with the ansible script.
Honestly i tried with one volume and i had no success.

radiant whale
slender steeple
#

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"

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
slender steeple
#

<@&895299822712659999> and <@&855071026954371088> - For better visibility

west dune
#

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. 🙂