Skip to content

Deprecated parameter when using the collection community.postgresql in modules with the db parameter #305

Description

@rainerrose

I first noticed it in the task Ensure PostgreSQL users are configured correctly. in the file tasks/users_props.yml

The db parameter is used there:

- name: Ensure PostgreSQL users are configured correctly.
  postgresql_user:
    name: "{{ item.name }}"
    password: "{{ item.password | default(omit) }}"
    encrypted: "{{ item.encrypted | default(omit) }}"
    role_attr_flags: "{{ item.role_attr_flags | default(omit) }}"
    db: "{{ item.db | default(omit) }}"

The db parameter, which is actually just an alias, has been deprecated and removed from the community.postgresql collection since version 5.0.0.

The error-message was:

Unsupported parameters for (postgresql_user) module: db. Supported parameters include: ca_cert, comment, configuration, conn_limit, connect_params, encrypted, expires, fail_on_user, login_db, login_host, login_password, login_port, login_unix_socket, login_user, no_password_changes, password, quote_configuration_values, reset_unspecified_configuration, role_attr_flags, session_role, ssl_cert, ssl_key, ssl_mode, state, trust_input, user (fail_on_role, name, ssl_rootcert).

See https://docs.ansible.com/projects/ansible/latest/collections/community/postgresql/postgresql_user_module.html#parameter-login_db

The version 5.0.0 was released two days ago.

If this parameter is changed to login_db, everything will work again.
In my opinion, this role should be reviewed and fixed after the deleted parameter has been used.

In the meantime, it might help to use the community.postgresql collection in the latest version of the 4 series, which should currently be 4.2.0.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions