solarkennedy/puppet-consul — pull request #21 by tylerwalts (2014-09-18 01:47:17+00:00)
Title: Added join_cluster param to have consul join a cluster after (re)starting service

For our use case we are bootstrapping environments and needed a way to designate certain roles to act as servers, and to have them all join the cluster based on a DNS deployment convention. This PR does 2 things:

# To be able to elect a leader, added the bootstrap_expect config as a simple integer cast in config.json.erb, until a more advanced approach can be implemented as described in PR 13.
# Added a param, join_cluster and an exec resource that subscribes to the consul service to re-join the cluster after any service restart.