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

拥有回忆 提交于 2019-12-11 09:28:02

问题


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...


回答1:


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).




回答2:


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



来源:https://stackoverflow.com/questions/25606454/puppet-and-postgres-annoying-warning-passing-version-to-postgresqlserver-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!