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
Jonathan Kamens 627371e2d8
dconf: Check for changes properly despite style of quotes used by user (#6049)
dconf: parse GVariant values to check for equality whenever possible

Direct string comparisons are an inaccurate way to compare two
GVariant representations. For example, 'foo' and "foo" (including the
quote marks, which are part of the representation) are equal GVariants
but if you just do a string compare (remember, including the quotes)
they'll be interpreted.

We therefore want to use the `gi.repository` Python library to parse
GVariant representations before comparing them whenever possible.

However, we don't want to assume that this library will always be
available or require it for Ansible to function, so we use a straight
string comparison as a fallback when the library isn't available. This
may result in some false positives, i.e., Ansible thinking a value is
changing when it actually isn't, but will not result in incorrect
values being written into `dconf`.

Co-authored-by: Jonathan Kamens <jik@jik5.kamens.us>
2023-03-04 20:51:50 +01: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 Remove unneccessary imports (#5940) 2023-02-12 19:48:39 +01:00
callback Remove unneccessary imports (#5940) 2023-02-12 19:48:39 +01:00
connection Add 'inventory_hostname' to the jail plugin documentation (#6118) 2023-03-03 22:56:24 +01:00
doc_fragments add xorder_discovery parameter (#6109) 2023-02-27 20:26:01 +01:00
filter JC: Add plugin parser functionality to JC Filter Plugin (#6043) 2023-02-23 16:54:38 +01:00
inventory Suppress urllib3 InsecureRequestWarnings when validate_certs option is false (#5931) 2023-02-13 21:36:09 +01:00
lookup stop passing loader/dataloader since it has been deprecated by ansible (#6074) 2023-02-25 15:29:27 +01:00
module_utils add xorder_discovery parameter (#6109) 2023-02-27 20:26:01 +01:00
modules dconf: Check for changes properly despite style of quotes used by user (#6049) 2023-03-04 20:51:50 +01:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00