Add new consul modules and reuse code between them. (#7878) Refactored consul modules and added new roles. (cherry picked from commit 29f9865497) Co-authored-by: Florian Apolloner <florian@apolloner.eu>
29f9865497