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/plugins
patchback[bot] 8a33e070be
[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 a5765143f1)

Co-authored-by: Jonathan Kamens <jik@kamens.us>
2023-04-13 07:18:19 +02:00
..
action Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
become Make pfexec become usable for illumos (#3889) 2022-10-05 08:26:40 +02:00
cache [PR #5940/2b8ac3c6 backport][stable-6] Remove unneccessary imports (#5976) 2023-02-12 20:22:44 +01:00
callback [PR #5940/2b8ac3c6 backport][stable-6] Remove unneccessary imports (#5976) 2023-02-12 20:22:44 +01:00
connection [PR #6118/9a97bc7c backport][stable-6] Add 'inventory_hostname' to the jail plugin documentation (#6137) 2023-03-03 23:10:59 +01:00
doc_fragments [PR #6185/512bf4b7 backport][stable-6] ldap moduls: add optional ca_cert_file option (#6217) 2023-03-22 13:15:48 +01:00
filter [PR #6043/c168f9c3 backport][stable-6] JC: Add plugin parser functionality to JC Filter Plugin (#6047) 2023-02-23 17:12:09 +01:00
inventory [PR #6200/59e58079 backport][stable-6] Adding open option to nmap (#6246) 2023-03-26 10:04:13 +02:00
lookup [PR #6250/05824a07 backport][stable-6] merge_variables: Fix example section (#6251) 2023-03-26 14:02:59 +00:00
module_utils [PR #6293/ea8720f5 backport][stable-6] Add skip_tags option to Puppet module (#6327) 2023-04-13 05:09:28 +00:00
modules [PR #6206/a5765143 backport][stable-6] dconf: three minor but useful fixes (#6330) 2023-04-13 07:18:19 +02:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00