galaxyproject / ansible-postgresql

An Ansible role for managing a PostgreSQL server
https://galaxy.ansible.com/galaxyproject/postgresql
122 stars 58 forks source link

role fails in check mode #27

Open PeterNerlich opened 3 years ago

PeterNerlich commented 3 years ago

When trying out this role without any vars on a fresh debian 10 system I got this error:

FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to be in '/home/peter/.ansible/roles/galaxyproject.postgresql/tasks/debian.yml': line 33, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set version fact\n  ^ here\n"
}

This is apparently because the task before, where the mentioned variable is to be registered, reports "msg": "skipped, running in check mode"

hexylena commented 3 years ago

Hi @PeterNerlich this is a known issue. A lot of the galaxy roles unfortunately don't support check mode. We'd welcome contributions to fix this, but the issue in a couple places is determining current versions in a check friendly way.

PeterNerlich commented 3 years ago

I see. This is more or less the first role from galaxy I used so I wasn't aware. Feel free to close if it's not desired to keep track of.

hexylena commented 3 years ago

Let's leave it open, it would be good to fix! Maybe someone will be motivated. I used to be a heavy --check user in the past but I think it's not so important to everyone.