Using nCLI non-interactively | Nutanix Community
Skip to main content

I would like to download the cluster info file so I can apply licenses to my prism element over CLI. I can do this interactively by opening an SSH command and it asks if I am sure [y/N].

 

When automating this, how do I go about entering “y”? I usually get around this by using -

echo 'y' | ncli license download-cluster-info file-path='/home/nutanix/cluster_name.csf'

 

But its not liking it -

nutanix@NTNX-20FM5A210030-A-CVM:10.248.8.62:~$ echo 'y' | ncli license download-cluster-info file-path='/home/nutanix/L02VM1.csf'
This operation will start the licensing process. Are you sure you want to proceed (y/N)?: Error: null

 

can you use “yes” command

for example:

 

yes | ncli license download-cluster-info file-path='/home/nutanix/L02VM1.csf'

 

let me know if that fixes your issue


Nope. Still doesn’t work. Same error.

 

For now, I have replaced SSH with REST v1.0 API. There is a licensing section which is working for now. Was surprised it got dropped in v2.0.


Can you try with “force=true”

 

For example: - 

ncli license download-cluster-info file-path='/home/nutanix/L02VM1.csf' force=true

 

Please let me know if it helps.