Merge pull request 'fix: enable new consul clusters to be started' (#173) from neoloc/consul_bootstrap into develop
Reviewed-on: unkinben/puppet-prod#173
This commit is contained in:
commit
98deb58fde
@ -1,10 +1,16 @@
|
|||||||
# profiles::consul::server
|
# profiles::consul::server
|
||||||
class profiles::consul::server (
|
class profiles::consul::server (
|
||||||
String $gossip_key,
|
Variant[
|
||||||
String $primary_datacenter,
|
Undef,
|
||||||
Hash $acl,
|
String
|
||||||
Hash $ports,
|
] $gossip_key = undef,
|
||||||
Hash $addresses,
|
Variant[
|
||||||
|
Undef,
|
||||||
|
String
|
||||||
|
] $primary_datacenter = undef,
|
||||||
|
Hash $acl = {},
|
||||||
|
Hash $ports = {},
|
||||||
|
Hash $addresses = {},
|
||||||
Boolean $members_lookup = false,
|
Boolean $members_lookup = false,
|
||||||
String $members_role = undef,
|
String $members_role = undef,
|
||||||
Array $consul_servers = [],
|
Array $consul_servers = [],
|
||||||
@ -39,6 +45,8 @@ class profiles::consul::server (
|
|||||||
Boolean $disable_update_check = true,
|
Boolean $disable_update_check = true,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
# wait for all attributes to be ready
|
||||||
|
if $facts['enc_role'] == $members_role {
|
||||||
# set a datacentre/cluster name
|
# set a datacentre/cluster name
|
||||||
$consul_cluster = "${::facts['country']}-${::facts['region']}"
|
$consul_cluster = "${::facts['country']}-${::facts['region']}"
|
||||||
|
|
||||||
@ -92,6 +100,7 @@ class profiles::consul::server (
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# consul before dnsmasq
|
# consul before dnsmasq
|
||||||
if defined(Class['consul']) {
|
if defined(Class['consul']) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user