feat: enabling changing ip for consul client
All checks were successful
Build / precommit (pull_request) Successful in 5m14s
All checks were successful
Build / precommit (pull_request) Successful in 5m14s
- enable ability to set consul client bind/advertise ip
This commit is contained in:
parent
62aade77ff
commit
463b0d35d4
@ -37,6 +37,7 @@ profiles::ssh::sign::principals:
|
||||
- "%{facts.networking.interfaces.enp3s0.ip}"
|
||||
|
||||
# configure consul service
|
||||
profiles::consul::client::host_addr: "%{hiera('networking_loopback0_ip')}"
|
||||
consul::services:
|
||||
incus:
|
||||
service_name: 'incus'
|
||||
|
||||
@ -11,6 +11,7 @@ class profiles::consul::client (
|
||||
Stdlib::Absolutepath $data_dir = '/opt/consul',
|
||||
Array[Hash] $node_rules = [],
|
||||
Hash $ports = {},
|
||||
Stdlib::IP::Address $host_addr = $facts['networking']['ip'],
|
||||
) {
|
||||
|
||||
if $facts['enc_role'] != $members_role {
|
||||
@ -42,8 +43,8 @@ class profiles::consul::client (
|
||||
'log_level' => 'INFO',
|
||||
'node_name' => $facts['networking']['fqdn'],
|
||||
'retry_join' => $servers_array,
|
||||
'bind_addr' => $::facts['networking']['ip'],
|
||||
'advertise_addr' => $::facts['networking']['ip'],
|
||||
'bind_addr' => $host_addr,
|
||||
'advertise_addr' => $host_addr,
|
||||
'enable_script_checks' => true,
|
||||
'ports' => $ports,
|
||||
'acl' => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user