Skip to content

Conversation

@Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Apr 23, 2025

SUMMARY

stable-2.16 has been created, adding it to the matrix

postgresql_db

A task containing an empty variable fails now

116     lc_collate: "pt_BR{{ locale_latin_suffix }}"

with

with `[ERROR]: Task failed: Module failed: Database query failed: invalid LC_COLLATE locale name: "pt_BRNone"

the var is defined as empty in another file, so Ansible since 2.19 substitutes it with None. In the earlier versions it seems to substitute it with an empty string.

Adding the following for the variable has helped for postgresql_db test target:

- set_fact:
    locale_latin_suffix: "{{ (locale_latin_suffix is not none) | ternary(locale_latin_suffix, '') }}"
postgresql_info

the failures were partly fixed. The following one was reported in ansible/ansible#85036

213       - result.databases is defined
214
215   - name: postgresql_info - test return publication info
        ^ column 5

fatal: [testhost]: FAILED! => {
    "changed": false,
    "msg": "Task failed: Module failed: Key of type 'int' is not JSON serializable by the 'module_legacy_m2c' profile."
}

@Andersson007 Andersson007 requested a review from hunleyd as a code owner April 23, 2025 11:22
@Andersson007 Andersson007 marked this pull request as draft April 23, 2025 11:22
@Andersson007
Copy link
Collaborator Author

(pinging @oraNod here as he asked)

@Andersson007
Copy link
Collaborator Author

Folks, fyi, the changes i've made for the _info module (see the commit) are not breaking. the core doesn't implicitly convert keys in return dicts to strings anymore, so we must convert ints to strs explicitly now, see ansible/ansible#85036

@Andersson007 Andersson007 marked this pull request as ready for review April 24, 2025 11:20
Andersson007 and others added 3 commits April 24, 2025 18:57
Co-authored-by: Andreas Scherbaum <andreasscherbaum@users.noreply.github.com>
Co-authored-by: Andreas Scherbaum <andreasscherbaum@users.noreply.github.com>
Co-authored-by: Andreas Scherbaum <andreasscherbaum@users.noreply.github.com>
@Andersson007
Copy link
Collaborator Author

Andersson007 commented Apr 24, 2025

@andreasscherbaum @hunleyd all committed (as far as i can see in the mobile app), thanks! ready for review/merge as soon as CI gets green

@Andersson007
Copy link
Collaborator Author

@hunleyd any other suggestions or we can merge?

@Andersson007 Andersson007 merged commit 14b99e1 into ansible-collections:main Apr 25, 2025
29 checks passed
@Andersson007
Copy link
Collaborator Author

@andreasscherbaum @hunleyd thanks for reviewing!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants