Skip to main content

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?

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.


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

 


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. 


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