Describe the Bug
Module tries to install package python-psycopg2 under Ubuntu 22.04 where that package no longer exists. It is available as python3-psycopg2 instead.
Expected Behavior
Module should distinguish between Ubuntu versions >= 22.04 and < 22.04 and install the correctly named Python PostgreSQL package.
Steps to Reproduce
-
include postgresql::lib::python on Ubuntu 22.04
-
Watch Puppet agent run fail:
E: Unable to locate package python-psycopg2
Error: /Stage[main]/Postgresql::Lib::Python/Package[python-psycopg2]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-psycopg2' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python-psycopg2 (corrective)
Environment
- Module version 9.2.0 and later
- Ubuntu 22.04