Refactor common tasks into separate role. Add logic to handle mesos&marathon vs marathon-only nodes.