Hi,
Here's the content of my whole file, thanks:
---
postgresql::globals::client_package_name: 'rh-postgresql96-postgresql'
postgresql::globals::createdb_path:
'/opt/rh/rh-postgresql96/root/usr/bin/createdb'
postgresql::globals::datadir: '/var/opt/rh/rh-postgresql96/lib/pgsql/data'
postgresql::globals::manage_package_repo: true
postgresql::globals::needs_initdb: false
postgresql::globals::psql_path: '/opt/rh/rh-postgresql96/root/usr/bin/psql'
postgresql::globals::server_package_name:
'rh-postgresql96-postgresql-server'
postgresql::server::service_name: 'rh-postgresql96-postgresql.service'
postgresql::server::service_reload: 'systemctl reload
rh-postgresql96-postgresql.service'
postgresql::server::ip_mask_deny_postgres_user: '0.0.0.0/32'
postgresql::server::ip_mask_allow_all_users: '0.0.0.0/0'
postgresql::server::listen_addresses: '*'
postgresql::server::service_restart_on_change: false
postgresql::server::contrib:
package_name:
'rh-postgresql96-postgresql-contrib'
packages_ensure:
true
postgresql::server::db:
'mydb1':
user: 'db1'
password: 'db1'
'mydb2':
user: 'db2'
password: 'db2'
'mydb3':
user: 'db3'
password: 'db3'
On Tuesday, May 29, 2018 at 3:09:08 AM UTC-4, Arnau wrote:
>
> Hi,
>
> are you sure the errors is about the contrib?
> can you show us the hiera content for ' postgresql::server::db' ? Could
> it be that you have an string when a Hash is expected (for the
> create_resource).
>
> Best,
> Arnau
>
> 2018-05-28 22:19 GMT+02:00 Ugo Bellavance <[email protected] <javascript:>>:
>
>> Hi,
>>
>> I am using the postgresql module and I wanted to put all my data in
>> hiera. Some parameters were simply looked up automatically, like
>> postgresql::globals:: and postgresql::server::.
>>
>> For postgresql::server::db, I had to put this in my manifest:
>>
>> $dbs=hiera('postgresql::server::db')
>> create_resources('postgresql::server::db', $dbs)
>>
>> And it works. However, I'm looking for a way to make
>> postgresql::server::contrib work as well, but I can't make it to work.
>> When I use the same recipe I get this error:
>>
>> no implicit conversion of String into Hash
>>
>> How can I make postgresql::server::contrib work as well and why aren't
>> ::db and ::contrib working out-of the box like globals and server?
>>
>> Format for ::db is:
>>
>> postgresql::server::db { 'db1':
>> user => 'user1',
>> password => password,
>> }
>>
>> Format for ::contrib is
>>
>> class {'postgresql::server::contrib':
>> package_name => 'rh-postgresql96-postgresql-contrib',
>> package_ensure => true,
>> }
>>
>>
>> Thanks,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/61c18a0f-76fe-4be8-83fc-aa8703f28cb5%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/puppet-users/61c18a0f-76fe-4be8-83fc-aa8703f28cb5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/93053ac8-a9ba-46e8-a6b7-e46fa150fad8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.