#Migrate from ancient PowerShell to Ansible

1 messages · Page 1 of 1 (latest)

brisk plank
#

Hello,
I got a task to migrate our ancient PS script which "automates" the creation of volumes to Ansible.
I do understand the basics of the NetAPP but my expertise is on Ansible, not netapp. So, please forgive any mistake.

So, back to the basics. Our current script do the following:

  1. Creates storage export policy and Volume(s)
  2. Initiates an LS mirror sync
  3. Creates SL volumes
  4. Creates Export Policies for

Part 1 is completed.
Now I need to move to part 2 and I believe I am a bit lost.
The PS script uses the following command:

Invoke-NcSnapmirrorLsUpdate -SourceCluster $SrcCluster -SourceVserver $srcSVM -SourceVolume $srcRootVol -ErrorAction SilentlyContinue | Out-Null

My initial thought was to use the netapp.ontap.na_ontap_snapmirror module, but I believe this is wrong.
Then someone mentioned that I don't need to initiate an LS snapmirror update because this is automatically done when I create the volume (since I use the junction_path).
So my questions:

  1. Do I have to initiate the LS Snapmirror update?
  2. If so, is the netapp.ontap.na_ontap_snapmirror module the right module to use?
  3. If it is, how do I use it?
  4. If it's not, how do I initiate the LS Snapmirror update? Using the rest-cli?
untold badger
#

If you don't update the LS mirrors, the new volumes won't immediately be visible from every node, so that's why our automated process forces an update of them. Normally, it's a scheduled process that runs every hour.

You can use the netapp.ontap.na_ontap_snapmirror module, you just have to specify the "relationship_type: load_sharing". But, this is not support with REST, so it will fail back to ZAPI. Hopefully they will update REST to support this in the future, because I think a lot of people still use LS mirrors (I know we do).