diff --git a/manifests/backup/pg_dump.pp b/manifests/backup/pg_dump.pp index eb4e3b4975..ff99779fb5 100644 --- a/manifests/backup/pg_dump.pp +++ b/manifests/backup/pg_dump.pp @@ -68,13 +68,13 @@ ) { # Install required packages if $package_name { - ensure_packages($package_name) + stdlib::ensure_packages($package_name) } if $install_cron { if $facts['os']['family'] == 'RedHat' { - ensure_packages('cronie') + stdlib::ensure_packages('cronie') } elsif $facts['os']['family'] != 'FreeBSD' { - ensure_packages('cron') + stdlib::ensure_packages('cron') } } diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000000..cd9779eda6 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,9 @@ +class postgresql ( + Hash[String[1], Hash] $instances = {}, +) { + $instances.each | $instance, $params| { + postgresql::server::instance { $instance: + * => $params, + } + } +} diff --git a/manifests/server/extension.pp b/manifests/server/extension.pp index aa83f708f5..c8b62985f6 100644 --- a/manifests/server/extension.pp +++ b/manifests/server/extension.pp @@ -129,7 +129,7 @@ default => $package_ensure, } - ensure_packages($package_name, { + stdlib::ensure_packages($package_name, { ensure => $_package_ensure, tag => 'puppetlabs-postgresql', }) diff --git a/manifests/server/instance/passwd.pp b/manifests/server/instance/passwd.pp index 89c9a53250..a397beda54 100644 --- a/manifests/server/instance/passwd.pp +++ b/manifests/server/instance/passwd.pp @@ -27,7 +27,7 @@ # psql will default to connecting as $user if you don't specify name $_datbase_user_same = $database == $user $_dboption = $_datbase_user_same ? { - false => " --dbname ${shell_escape($database)}", + false => " --dbname ${stdlib::shell_escape($database)}", default => '' } @@ -37,7 +37,7 @@ # without specifying a password ('ident' or 'trust' security). This is # the default for pg_hba.conf. $escaped = postgresql::postgresql_escape($real_postgres_password) - $exec_command = "${shell_escape($psql_path)}${_dboption} -c \"ALTER ROLE \\\"${shell_escape($user)}\\\" PASSWORD \${NEWPASSWD_ESCAPED}\"" # lint:ignore:140chars + $exec_command = "${stdlib::shell_escape($psql_path)}${_dboption} -c \"ALTER ROLE \\\"${stdlib::shell_escape($user)}\\\" PASSWORD \${NEWPASSWD_ESCAPED}\"" # lint:ignore:140chars exec { 'set_postgres_postgrespw': # This command works w/no password because we run it as postgres system # user diff --git a/metadata.json b/metadata.json index aae032a220..2443217f39 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 5.2.0 < 10.0.0" + "version_requirement": ">= 9.0.0 < 10.0.0" }, { "name": "puppetlabs/apt",