Do not require ssl on localhost
authorPeter Palfrader <peter@palfrader.org>
Sun, 29 Sep 2019 17:02:19 +0000 (19:02 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 29 Sep 2019 17:02:19 +0000 (19:02 +0200)
modules/postgres/manifests/cluster.pp
modules/postgres/manifests/cluster/hba_entry.pp

index 1f639cd..4d28db0 100644 (file)
@@ -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" |>
   }
index 843a4a7..8294ffa 100644 (file)
@@ -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,