postgresql setup using puppet

16 views
Skip to first unread message

Ryan Carl

unread,
May 4, 2023, 7:59:27 PM5/4/23
to Puppet Users
I am setting up postgresql using the postgresql module.  
I have most things working. 
My issue is the config_entry as I am trying to add ssl to the config.
I have this in hiera:

pgsql_config_entries:
  - name: ssl
    value: on
  - name: ssl_cert_file
    value: '/etc/pki/tls/certs/servername.pem'
  - name: ssl_key_file
    value: '/etc/pki/tls/private/servername.key'

In my manifest I create config entries as follows: 
$config_entries = lookup('pgsql_config_entries')
$config_entries.each | Hash $ce | {
      postgresql::server::config_entry{ $ce['name'] :
            ensure  => 'present',
            value     => $ce['value'],
            path       => '/opt/pgdata/pgsql-15/postgresql.conf',
      }
}

Puppet OSS(6.28.0) throws this error: /Stage[main]/Profile::mypostgresql/Postgresql::Server::Config_entry[ssl]/Postgresql_conf[ssl]:  Could not evaluate: undefined method 'match' for true:TrueClass

I have everything else working on this setup other than the SSL, but I can find no examples of how the Config_entry should work.  
Any help would be very appreciated.
Thanks,
Ryan Carl




Dirk Heinrichs

unread,
May 5, 2023, 1:42:33 AM5/5/23
to puppet...@googlegroups.com
Am Donnerstag, dem 04.05.2023 um 16:57 -0700 schrieb Ryan Carl:

  value: on

Could not evaluate: undefined method 'match' for true:TrueClass

I guess YAML treats this as a boolean, unless you put it in quotes.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
Reply all
Reply to author
Forward
0 new messages