1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments/6206-dconf-booleans.yml

3 lines
182 B
YAML
Raw Normal View History

[PR #6206/a5765143 backport][stable-6] dconf: three minor but useful fixes (#6330) dconf: three minor but useful fixes (#6206) * dconf: Correctly handle setting a key that has no value in DB We need to check if the value in the database is None before we try to parse it, because the GVariant parser won't accept None as an input value. By definition if the value is None, i.e., there's no value in the database, than any value the user is trying to set is a change, so just indicate that it's a change without trying to compare the None to whatever the user specified as the value.x * dconf: Give a more useful error when writing a key fails if writing a key fails, then include in the error that is returned the exact key and value aguments that were given to the dconf command, to assist in diagnosing failures caused by providing the key or value in the wrong format.x * dconf: Convert boolean values into the format that dconf expects Even though we warn users to be careful to specify GVariant strings for values, a common error is to be trying to specify a boolean string which ends up getting converted into a boolean by the YAML parser or Ansible. Then it gets converted to "True" or "False", the string representations of Python booleans, which are not valid GVariants. Rather than just failing with an obscure error when this happens, let's be more user-friendly and detect when the user has specified a boolean and convert it into the correct GVariant forms, "true" or "false", so it just works. There's no good reason to be more pedantic than that. (cherry picked from commit a5765143f1b172396749f8ab54a466b8f3e2be74) Co-authored-by: Jonathan Kamens <jik@kamens.us>
2023-04-13 07:18:19 +02:00
minor_changes:
- "dconf - be forgiving about boolean values: convert them to GVariant booleans automatically (https://github.com/ansible-collections/community.general/pull/6206)."