-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community.general.dconf task fails if key does not exist #6271
Comments
Files identified in the description: If these files are incorrect, please update the |
CC @jikamens |
This is fixed in #6206. |
@jikamens thanks! Any estimation concerning the release of the fixed version? |
The fix will be in the next release of community.general, though I don't know when that will be, and if you're using community.general from a third-party vendor repo rather than straight from the Ansible repo then it could be some time after Ansible releases the new version before your vendor updates to it. |
Version 6.5.0 introduces a bug where keys must already exist when using dconf. See: - https://github.com/ansible-collections/community.general/blob/stable-6/CHANGELOG.rst - ansible-collections/community.general#6049 - ansible-collections/community.general#6271
The next minor release will happen on ~April 24th (see #582). |
Version 6.5.0 introduces a bug where keys must already exist when using dconf. See: - https://github.com/ansible-collections/community.general/blob/stable-6/CHANGELOG.rst - ansible-collections/community.general#6049 - ansible-collections/community.general#6271
Closing since a PR fixing this has been merged (and will get released ~tomorrow). |
Summary
When I try to run the module "community.general.dconf" to insert a value on a key that has no previous value, it throws an error (Argument 1 does not allow None as a value).
** Any value and on any key. I even tried with the ones from the Ansible Docs.
** I installed the community.general and psutils.
If I set the value manually and then run the playbook, it works! I also tried become: true, but I get another error.
01 - Just run the playbook, it does not work.
become: false
community.general.dconf:
key: "/org/gnome/desktop/interface/color-scheme"
value: "'prefer-dark'"
state: "present"
02 - Set value manually and then run the playbook, it works!
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
become: false
community.general.dconf:
key: "/org/gnome/desktop/interface/color-scheme"
value: "'prefer-dark'"
state: "present"
dconf read /org/gnome/desktop/interface/color-scheme
It shows the correct value.
Issue Type
Bug Report
Component Name
dconf
Ansible Version
Community.general Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Steps to Reproduce
Expected Results
I expected to dconf change the value from the key, not to throw an error.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: