Refactoring variables and bug fix in mesos role tasks.