profile::example::postgresql hardcodes both the package and service name as postgresql and passes a bare major version (e.g. "16") to package.ensure:
package { 'postgresql': ensure => $version }
service { 'postgresql': ensure => 'running', enable => true }
metadata.json advertises support for RHEL-family, Debian-family, and Windows, but on RPM-based systems the server package is postgresql-server (the postgresql package is just the client), the data directory needs initdb before the service can start, and a bare "16" is not a valid RPM version string. On Windows there is no postgresql package/service by default at all. Unit tests only assert compiled resource shape, so none of this is caught.
Fix options: scope the example to platforms where the simple form works, derive names per os.family from module data, or add a comment stating the example is illustrative and not portable.
profile::example::postgresqlhardcodes both the package and service name aspostgresqland passes a bare major version (e.g."16") topackage.ensure:metadata.jsonadvertises support for RHEL-family, Debian-family, and Windows, but on RPM-based systems the server package ispostgresql-server(thepostgresqlpackage is just the client), the data directory needsinitdbbefore the service can start, and a bare"16"is not a valid RPM version string. On Windows there is nopostgresqlpackage/service by default at all. Unit tests only assert compiled resource shape, so none of this is caught.Fix options: scope the example to platforms where the simple form works, derive names per
os.familyfrom module data, or add a comment stating the example is illustrative and not portable.