Skip to main content

Hello, 

I am looking for a way to automate the addition of a category for a DR Protection Policy.  I want the playbook to look for the categories of Production and Mission Critical for a VM.  If those two categories are present, I then want to add the category of DisasterRecoveryEnabled.  

Thank you,

Joe

Hello,

Did you look at https://galaxy.ansible.com/ui/repo/published/nutanix/ncp/docs/ and https://github.com/nutanix/nutanix.ansible ?
I was working for something similar. In our case, the goad is to identify VM which are not using Category and assign the category to it.

To do so, I 1rst have a playbook that list the category ( using nutanix.ncp.ntnx_categories_info_v2 ). It allow to retrieve UUID (ext_id ) of the Category. 
Then using nutanix.ncp.ntnx_vms_info_v2, I’m finding the UUID of the VM

At the end, using nutanix.ncp.ntnx_vms_categories_v2, I can assign category to the VM


Thanks Pathos01, 

I haven't done so yet, but I will look into this now.

Joe


Reply