hashipi

Raspberry Pi Test Cluster for HashiCorp Vault, Nomad and Consul
git clone https://git.in0rdr.ch/hashipi.git
Log | Files | Refs | README

commit 2352328373c6c7526519e121070f841b83341041
parent 2b68f292a1e5417114be5e8e77b85312afd3f17b
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Thu, 13 Apr 2023 16:25:47 +0200

feat: use only ipv4 sockaddr

Diffstat:
Mconsul.sh | 4++--
Mvault.sh | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/consul.sh b/consul.sh @@ -63,14 +63,14 @@ ports { } addresses { - dns = "{{GetInterfaceIP \"eth0\"}}" + dns = "{{GetPrivateInterfaces | exclude \"type\" \"IPv6\" | include \"name\" \"eth0\" | attr \"address\" }}" } # The address that should be bound to for internal cluster communications. # If there are multiple private IPv4 addresses available, Consul will exit with an error at startup: # - https://www.consul.io/docs/troubleshoot/common-errors # - https://www.consul.io/docs/agent/options -bind_addr = "{{GetInterfaceIP \"eth0\"}}" +bind_addr = "{{GetPrivateInterfaces | exclude \"type\" \"IPv6\" | include \"name\" \"eth0\" | attr \"address\" }}" performance { raft_multiplier = 1 diff --git a/vault.sh b/vault.sh @@ -92,9 +92,9 @@ listener "tcp" { # CNAME). This leads to problems with Haproxy server-template. # # API_ADDR for client redirection (fallback, if request forwarding is disabled) -api_addr = "https://{{GetInterfaceIP \"eth0\"}}:8200" +api_addr = "https://{{GetPrivateInterfaces | exclude \"type\" \"IPv6\" | include \"name\" \"eth0\" | attr \"address\" }}:8200" # CLUSTER_ADDR: Vault listens for server-to-server cluster requests -cluster_addr = "https://{{GetInterfaceIP \"eth0\"}}:8201" +cluster_addr = "https://{{GetPrivateInterfaces | exclude \"type\" \"IPv6\" | include \"name\" \"eth0\" | attr \"address\" }}:8201" storage "consul" { address = "https://127.0.0.1:8501"