saltstack/salt-cloud — pull request #694 by mattmb (2013-07-29 11:26:10+00:00)
Title: Dependencies in cloud map

Hi All,

Here's what I've been working on as part of the salt sprint.

I wanted to be able to make machines dependent on each other in a cloud map so that they get deployed in a specific order.

So you can do something like:
```
ubuntu_small:
- web01:
requires:
- db01
- web02:
requires:
- db01
- db01
- loadbalancer:
requires:
- web01
- web02
```

This is straightforward for non parallel deployments because I can just order the list before we deploy. However it is more tricky in parallel. I found that adding a start_action for parallel deployments wasn't working at all so with these changes the start actions get triggered after all the machines have been deployed (but respecting the dependencies). So the machines are all created at the same time but the start actions run in the correct way afterwards.

I'd welcome some feedback/debate on whether this is the best way of doing it? Also on formatting the start_action output?

Thanks,
Matt