ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

[CentOS8]Fresh install don't create system user #471

Closed flotho closed 6 months ago

flotho commented 4 years ago

Hi,

Thanks for the awesome work. Is it normal that with a fressh centos 8 installation I have this kind of messages :

PostgreSQL | Make sure the postgres data directory exists

fatal: [myansiblehost]: FAILED! => {
    "changed": false,
    "gid": 0,
    "group": "root",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "access_time": null,
            "access_time_format": "%Y%m%d%H%M.%S",
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": "postgres",
            "mode": 448,
            "modification_time": null,
            "modification_time_format": "%Y%m%d%H%M.%S",
            "owner": "postgres",
            "path": "/var/lib/pgsql/11/data",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "directory",
            "unsafe_writes": null
        }
    },
    "mode": "0755",
    "msg": "chown failed: failed to look up user postgres",
    "owner": "root",
    "path": "/var/lib/pgsql/11/data",
    "size": 4096,
    "state": "directory",
    "uid": 0
}

The postgres user is not available in the system, is it a normal way to work ? Should your role deal with it ?

flotho commented 4 years ago

Hi

I also think that this https://github.com/ANXS/postgresql/blob/97d6d5c4bbbc1f4860fbf0959c02ff4f41b0e86e/tasks/main.yml#L23 should be changed accordingly to deal with dnf package manager

jdeg commented 3 years ago

Hi,

Thanks for the awesome work. Is it normal that with a fressh centos 8 installation I have this kind of messages :

PostgreSQL | Make sure the postgres data directory exists

fatal: [myansiblehost]: FAILED! => {
    "changed": false,
    "gid": 0,
    "group": "root",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "access_time": null,
            "access_time_format": "%Y%m%d%H%M.%S",
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": "postgres",
            "mode": 448,
            "modification_time": null,
            "modification_time_format": "%Y%m%d%H%M.%S",
            "owner": "postgres",
            "path": "/var/lib/pgsql/11/data",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "directory",
            "unsafe_writes": null
        }
    },
    "mode": "0755",
    "msg": "chown failed: failed to look up user postgres",
    "owner": "root",
    "path": "/var/lib/pgsql/11/data",
    "size": 4096,
    "state": "directory",
    "uid": 0
}

The postgres user is not available in the system, is it a normal way to work ? Should your role deal with it ?

@flotho Did you find a solution for this issue?

I'm getting the same output when I run the playbook

TASK [ANXS.postgresql : PostgreSQL | Make sure the postgres data directory exists] ************************************************************************************************************************* fatal: [69.164.199.147]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "msg": "chown failed: failed to look up user postgres", "owner": "root", "path": "/var/lib/pgsql/11/data", "secontext": "unconfined_u:object_r:postgresql_db_t:s0", "size": 4096, "state": "directory", "uid": 0}

jdeg commented 3 years ago

Never mind, I downloaded the code from the repo instead of Galaxy and it worked.

github-actions[bot] commented 8 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

github-actions[bot] commented 6 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.