From 019eefed08e38a14827ba6f1cffa6bdc8b972a13 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 29 Sep 2019 19:02:19 +0200 Subject: [PATCH] Do not require ssl on localhost --- modules/postgres/manifests/cluster.pp | 13 +++++++------ modules/postgres/manifests/cluster/hba_entry.pp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/postgres/manifests/cluster.pp b/modules/postgres/manifests/cluster.pp index 1f639cda8..4d28db0c7 100644 --- a/modules/postgres/manifests/cluster.pp +++ b/modules/postgres/manifests/cluster.pp @@ -87,12 +87,13 @@ define postgres::cluster( content => template('postgres/cluster/pg_hba.conf-head.erb'), } postgres::cluster::hba_entry { 'local-connections': - pg_port => $real_port, - database => 'all', - user => 'all', - address => ['127.0.0.1', '::1'], - order => '30', - firewall => false, + pg_port => $real_port, + connection_type => 'host', + database => 'all', + user => 'all', + address => ['127.0.0.1', '::1'], + order => '30', + firewall => false, } Concat::Fragment <| tag == "postgres::cluster::${real_version}::${real_cluster}::hba" |> } diff --git a/modules/postgres/manifests/cluster/hba_entry.pp b/modules/postgres/manifests/cluster/hba_entry.pp index 843a4a780..8294ffa16 100644 --- a/modules/postgres/manifests/cluster/hba_entry.pp +++ b/modules/postgres/manifests/cluster/hba_entry.pp @@ -20,7 +20,7 @@ define postgres::cluster::hba_entry ( Optional[Integer] $pg_port = undef, Optional[String] $pg_cluster = undef, Optional[String] $pg_version = undef, - Enum['local', 'hostssl'] $connection_type = 'hostssl', + Enum['local', 'host', 'hostssl'] $connection_type = 'hostssl', Variant[String,Array[String]] $database = 'sameuser', Variant[String,Array[String]] $user = 'all', Optional[Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]] $address = undef, -- 2.20.1