-
Notifications
You must be signed in to change notification settings - Fork 113
Description
SUMMARY
Once I upgraded my Ansible to version 13.0 (with ansible-core 2.20), I got some deprecation warnings from community.postgresql tasks that weren't there before.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
- community.postgresql.postgresql_info
- community.postgresql.postgresql_user
- possibly others
ADDITIONAL INFORMATION
I believe the deprecation warnings to be coming from code in the community.postgresql collection rather than from (task/playbook) configuration on my side.
If I am mistaken, please do correct me (and if possible help me fix it).
If not, this porting guide may help fix the warnings: https://docs.ansible.com/projects/ansible/latest/porting_guides/porting_guide_13.html
Task with community.postgresql.postgresql_info:
- name: Get PostgreSQL version and settings
community.postgresql.postgresql_info:
filter: "version,settings"
login_db: "postgres"
ssl_mode: "disable"
register: pg_info
become: true
become_user: postgresOutcome: as expected, but with the following deprecation warning:
[DEPRECATION WARNING]: Importing 'to_native' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.Task with community.postgresql.postgresql_user:
- name: Create user with superuser privileges
community.postgresql.postgresql_user:
login_db: "postgres"
role_attr_flags: "SUPERUSER"
state: "present"
name: "{{ postgres_username }}"
password: "{{ postgres_password }}"
become: true
become_user: postgresOutcome: as expected, but with the following deprecation warnings:
[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.
[DEPRECATION WARNING]: Importing 'to_text' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.