Skip to content

Commit

Permalink
puppetlabs/stdlib: Require 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jun 21, 2023
1 parent 8a64280 commit 6f37419
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions manifests/backup/pg_dump.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}

Expand Down
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class postgresql (
Hash[String[1], Hash] $instances = {},
) {
$instances.each | $instance, $params| {
postgresql::server::instance { $instance:
* => $params,
}
}
}
2 changes: 1 addition & 1 deletion manifests/server/extension.pp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
default => $package_ensure,
}

ensure_packages($package_name, {
stdlib::ensure_packages($package_name, {
ensure => $_package_ensure,
tag => 'puppetlabs-postgresql',
})
Expand Down
4 changes: 2 additions & 2 deletions manifests/server/instance/passwd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ''
}

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6f37419

Please sign in to comment.