Mulitple actions in playbook | Nutanix Community
Skip to main content
Solved

Mulitple actions in playbook


Forum|alt.badge.img

Hi 

I using playbook to categorize vm’s according to cluster,os,sla and such. 

It’s working, but I want to see if it’s possible to assign a category based on two or more conditions. I’m only able to use the ‘branch’ to evaluate one condition. Is it possible to do AND when evaluating if a vm is assigned to a category?

Best answer by JeroenTielen

That is because you have the “add to category - DC1” already there (hence the message: branches cannot be created before a non-branch action). So remove the add to category first and you can create the extra if statement. There is also an “else” statement so you can be verry flexible. 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

JeroenTielen
Forum|alt.badge.img+8
  • Vanguard
  • 1303 replies
  • January 22, 2025

You can do multiple “if” statements below each other. Thatway you can create two or more conditions. 

For example: If alert is new machine created → If vmname start with WIN → Assign category Windows Machine.


Forum|alt.badge.img
  • Author
  • Adventurer
  • 3 replies
  • January 22, 2025

I don’t see how I can chain two IF statements, It’s not allowed to set a Branch action right after another Branch action.  

 

 

 

What I want to accomplish is to catch VM that is in DC1 cluster AND has a name that indicates it’s role. According to that add category such as DC1-Production or DC2-Test.

Please advice what I’m doing wrong here on the attached picture.

 

Regards,

Jóhannes

 


JeroenTielen
Forum|alt.badge.img+8
  • Vanguard
  • 1303 replies
  • Answer
  • January 22, 2025

That is because you have the “add to category - DC1” already there (hence the message: branches cannot be created before a non-branch action). So remove the add to category first and you can create the extra if statement. There is also an “else” statement so you can be verry flexible. 


Forum|alt.badge.img
  • Author
  • Adventurer
  • 3 replies
  • January 22, 2025

Thanks Jeroen, this works and now the workflow makes much more sense to me.