Maximiliano Padulo
Maximiliano Padulo

Reputation: 1522

Puppet and Postgres annoying warning: Passing "version" to postgresql::server is deprecated

I'm using the puppet-postgresql module to manage PostgreSQL. That part of the manifest looks like this:

class { 'postgresql::server':
    postgres_password          => 'postgres',
}
postgresql::server::db { $db_name:
    user     => $db_user,
    password => postgresql_password($db_user, $db_password),
}

Works fine but I get the annoying warning:

Warning: Scope(Class[Postgresql::Server]): Passing "version" to postgresql::server is deprecated; please use postgresql::globals instead.

EDIT: I even added the version to the globals, but I'm still getting the warning:

class { 'postgresql::globals':
  version             => '9.3',
}->
class { 'postgresql::server':
    postgres_password          => 'postgres',
}
postgresql::server::db { $db_name:
    user     => $db_user,
    password => postgresql_password($db_user, $db_password),
}

But I'm not passing any 'version' to postgresql::server. What I'm doing wrong here?

Docs https://forge.puppetlabs.com/puppetlabs/postgresql didn't helped me in this case...

Upvotes: 1

Views: 500

Answers (2)

Dominic Cleal
Dominic Cleal

Reputation: 3205

It's a bug in the puppetlabs-postgresql module in the 3.4.x series. It's since been fixed in PR 471 which will be released in the next major version (4.0.0 by the looks of it).

Upvotes: 3

webNeat
webNeat

Reputation: 2828

If you don't specify the version, a default version is selected by the module in the file manifests/globals.pp. So you can either edit this file to specify a newer version for your OS or pass the version in parameter when calling postgresql::server

Upvotes: 0

Related Questions