用puppet修改postgresql模板

时间:2015-10-08 22:44:14

标签: postgresql puppet

我正在使用puppet / postgresql模块来安装,配置和创建我的postgresql数据库。

我正在安装contrib包,并希望启用uuid-ossp扩展程序。对我而言,我想在'template1'数据库中启用此扩展。然后我会使用template1 DB作为我创建的所有数据库的源。

我在这个模块中找不到任何钩子来帮助我修改template1 DB。这可能吗?

我知道如果我已安装postgresql,我可以执行以下操作:

psql -d template1 -c 'create extension "uuid-ossp";'

1 个答案:

答案 0 :(得分:0)

看起来他们有一个名为postgresql_psql的提供程序,用于在template1上设置编码。

检查他们如何在postgresql / manifests / server / initdb.pp中使用它,也许它也可以帮助你的用例。