#Handling File Locks

1 messages · Page 1 of 1 (latest)

kind scaffold
#

Hi, does anyone know which Ansible module I can use to handle file locks? I'm looking through the list but I can't seem to find anything..

stoic temple
#

Could you give us an example of the command?

kind scaffold
#

I only know for sure the one in PowerShell: Get-NcLock

stoic temple
#

Could it be

This was added in in 21.19.0.

kind scaffold
#

I'm looking at the docs for that one and it seems like that more for the actual time than file locks, am I wrong about that?

#

Another command I think I found is: vserver locks show

#

I see on the rest API protocols/locks (which I think might be it), but the issue is I can't access it using rest API because we are still on 9.8p7

stoic temple
#

sorry, I read it as c-lock, not clock. But the two locks I see are related to snaplock, or protocols/locks as you just said.

#

For ZAPI, we have na_ontap_info. But there is nothing about lock. The two alternatives with ZAPI are na_ontap_command and na_ontap_zapit. The first one enables you to send a command, but requires admin access.

#

The command would be vserver locks show

kind scaffold
#

I was looking at ontap_info for the locks and I thought I was blind for not finding anything about locks, so thanks for confirming, I'm guessing I'll have to use na_ontap_command one then

#

Thank you for helping

stoic temple
#

If you are on 9.8, it's better to use na_ontap_rest_cli (a GET on vserver/locks should work).