Skip to content

postgresql_server handler to restart postgreql fails when postgresql_server__version is empty. #393

Open

Description

@mdicss

Before submitting:

  • I have searched existing issues to make sure this is not a duplicate.
  • I am using the latest release.
  • I agree to follow the Code of Conduct.

Bug description

Hi
When I use postgresql_server, I get an error like:
FAILED! => {"changed": false, "msg": "Could not find the requested service postgresql-: host"}
with the minus added to the service name. This seems to happen, when postgresql_server__version is empty and the handler to restart the postgresql service is called.
A workaround is to set lfops__skip_restart_handlers: true.

Steps to reproduce

Run the task without a value for postgresql_server__version.

Expected behavior

No response

Environment

RockyLinux 10.2 and running Ansible from AWX.

Additional context

No response

Activity

  1. NavidSassan commented on Sep 22, 2026

    @NavidSassan
    Member

    Hi @mdicss

    Thanks for the report!

    The problem is already fixed in #380, I'll merge that soon. Note that we switched to only installing PostgreSQL from their upstream PostgreSQL Yum Repository in that PR, which makes postgresql_server__version a mandatory variable. Let me know if this would be a problem for you.

  2. mdicss commented on Sep 23, 2026

    @mdicss
    Author

    Thank you.
    It is no Problem to have the version mandatory. I can change the playbook to use a specific version.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions