1
votes

I am trying to disable the managing of the Postgresql repo using Hiera when using the puppetlabs/postgresql module. I have tried every Hiera combination I can think of (from reading the docs/code) but nothing works.

  • puppetdb::database::postgresql::manage_package_repo: false
  • puppetdb::globals::manage_package_repo: false
  • postgresql::globals::manage_package_repo: false

It still adds the /etc/apt/sources.list.d/apt.postgresql.org.list which won't work since we are using our own Aptly mirror and servers cannot directly communicate with the internet, and so the apt update fails and the entire puppet agent run fails with it.

How do I disable the management of /etc/apt/sources.list.d/apt.postgresql.org.list using Hiera?

System:

  • OS: Ubuntu 16.04 and 20.04 puppetserver version: 6.12.0
  • puppet-version: 6.16.0
  • puppetserver version: 6.12.0
  • mod 'puppetlabs/postgresql', '6.5.0'
  • mod 'puppetlabs/puppetdb', '7.4.0'
  • mod 'puppetlabs/stdlib', '6.3.0'
2
Hiera data does not stand alone. Its effects depend on how you declare the classes involved in your manifests, and they may also depend on other data and / or on the facts reported by the target node. Please present at least a minimal manifest with which you can reproduce your issue (that being that the postgresql repo is managed, even though you don't want it to be).John Bollinger

2 Answers

0
votes

According to the source for the PostgreSQL Puppet module, the repos are disabled by setting

postgresql::globals::manage_package_repo: false

And according to the source for PuppetDB, its repos are disabled with

puppetdb::manage_package_repo: false

You'll need to set both.

Note that setting these values to false won't remove the repo if it has already been installed, so if that has happened, you'll need to remove it by hand before running Puppet.

0
votes

I don't think you should be doing anything with puppetdb, that's Puppet's own database where it stores node data and agent run reports. The configuration is definitely going to be somewhere below postgresql::