postgresqlpuppethiera

Puppetdb and postgresql module: How to manage Postgresql but NOT manage Postgresql REPO using Hiera?


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.

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:


Solution

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