crowbar/barclamp-crowbar — pull request #992 by bkutil (2014-03-13 15:39:07+00:00)
Title: Add conflicts_with constraint

conflicts_with constraint covers the scenario when a node can be
assigned to a certain role only if it is not assigned to any of the
listed roles.

E.g.: A node can be either a pacemaker-cluster-member OR
a pacemaker-cluster-founder, but not both. This would be archieved by
adding these constraints to the model:

```ruby
{
"pacemaker-cluster-founder" => {
"conflicts_with" => "pacemaker-cluster-member",
},
"pacemaker-cluster-member" => {
"conflicts_with" => "pacemaker-cluster-founder",
}
}
```

The conflicts_with value can be either a string, which specifies a
single conflicting role, or an array for the case of multiple roles:

```ruby
{
"roleA" => { "conflicts_with" => ["roleB", "roleC"] }
}
```