diff --git a/bin/metadata-json-lint b/bin/metadata-json-lint new file mode 100755 index 0000000000..a91e611a87 --- /dev/null +++ b/bin/metadata-json-lint @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true +# +# This file was generated by Bundler. +# +# The application 'metadata-json-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("metadata-json-lint", "metadata-json-lint") diff --git a/bin/puppet b/bin/puppet new file mode 100755 index 0000000000..7f0660b294 --- /dev/null +++ b/bin/puppet @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true +# +# This file was generated by Bundler. +# +# The application 'puppet' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("puppet", "puppet") diff --git a/bin/puppet-lint b/bin/puppet-lint new file mode 100755 index 0000000000..b406bd0203 --- /dev/null +++ b/bin/puppet-lint @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true +# +# This file was generated by Bundler. +# +# The application 'puppet-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("puppet-lint", "puppet-lint") diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000000..486010f468 --- /dev/null +++ b/bin/rake @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rake", "rake") diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000000..ccb4d56304 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true +# +# This file was generated by Bundler. +# +# The application 'rubocop' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rubocop", "rubocop") diff --git a/manifests/globals.pp b/manifests/globals.pp index 1e192f91d9..98d9ee5b46 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -53,6 +53,7 @@ $data_checksums = undef, $timezone = undef, + $manage_postgresql_conf = undef, $manage_pg_hba_conf = undef, $manage_pg_ident_conf = undef, $manage_recovery_conf = undef, diff --git a/manifests/params.pp b/manifests/params.pp index 44ff66458d..252e8b9c24 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -19,6 +19,7 @@ $service_restart_on_change = true $service_provider = $postgresql::globals::service_provider $manage_pg_hba_conf = pick($manage_pg_hba_conf, true) + $manage_postgresql_conf = pick($manage_postgresql_conf, true) $manage_pg_ident_conf = pick($manage_pg_ident_conf, true) $manage_recovery_conf = pick($manage_recovery_conf, false) $package_ensure = 'present' diff --git a/manifests/server.pp b/manifests/server.pp index 7509ec97e1..0bb6d4c1fa 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -51,6 +51,7 @@ $data_checksums = $postgresql::params::data_checksums, $timezone = $postgresql::params::timezone, + $manage_postgresql_conf = $postgresql::params::manage_postgresql_conf, $manage_pg_hba_conf = $postgresql::params::manage_pg_hba_conf, $manage_pg_ident_conf = $postgresql::params::manage_pg_ident_conf, $manage_recovery_conf = $postgresql::params::manage_recovery_conf, diff --git a/manifests/server/config.pp b/manifests/server/config.pp index a2f2434485..b028df00cf 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -14,6 +14,7 @@ $user = $postgresql::server::user $group = $postgresql::server::group $version = $postgresql::server::_version + $manage_postgresql_conf = $postgresql::server::manage_postgresql_conf $manage_pg_hba_conf = $postgresql::server::manage_pg_hba_conf $manage_pg_ident_conf = $postgresql::server::manage_pg_ident_conf $manage_recovery_conf = $postgresql::server::manage_recovery_conf @@ -23,6 +24,15 @@ $log_line_prefix = $postgresql::server::log_line_prefix $timezone = $postgresql::server::timezone + if ($manage_postgresql_conf == true) { + # Prepare the main pg_hba file + file { $postgresql_conf_path: + owner => $user, + group => $group, + mode => '0600', + notify => Class['postgresql::server::service'], + } + } if ($manage_pg_hba_conf == true) { # Prepare the main pg_hba file concat { $pg_hba_conf_path: @@ -32,7 +42,6 @@ warn => true, notify => Class['postgresql::server::reload'], } - if $pg_hba_conf_defaults { Postgresql::Server::Pg_hba_rule { database => 'all',