clean up provisioning action

The provisioning action is a bit hard to follow.  Turn it into a
big nested computation that lays bare all the decisions as a
starting point for gathering feedback for a better refactoring.