Skip to content

PostgreSQL example profile is not portable across the operating systems metadata.json advertises #13

Description

@miharp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions