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.
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.
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.