* Remove redundant type in the 'path' documentation

* Remove unreachable code
This commit is contained in:
sheidan 2025-07-22 15:56:03 -04:00
commit 588eb3c52b

View file

@ -67,7 +67,6 @@ options:
is why the type of this parameter is "raw"). is why the type of this parameter is "raw").
path: path:
type: path type: path
required: false
description: description:
- Remote path to the configuration to apply. - Remote path to the configuration to apply.
- One of O(value) and O(path) are required for O(state=present). - One of O(value) and O(path) are required for O(state=present).
@ -557,12 +556,6 @@ def main():
# Use 'dconf write' to modify the key # Use 'dconf write' to modify the key
changed = dconf.write(module.params['key'], module.params['value']) changed = dconf.write(module.params['key'], module.params['value'])
module.exit_json(changed=changed) module.exit_json(changed=changed)
else:
# NOTE: This case shouldn't happen yet as 'key' and 'path' are
# required with 'state=present'
# TODO: if 'key' ends with '/' then 'dconf list' should be used
# else, 'dconf read'
module.fail_json(msg="'key' or 'path' must be defined.")
elif module.params['state'] == 'absent': elif module.params['state'] == 'absent':
changed = dconf.reset(module.params['key']) changed = dconf.reset(module.params['key'])
module.exit_json(changed=changed) module.exit_json(changed=changed)