diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:25:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:25:14 +0000 |
commit | 96cd7fb2ad41201fb0fde67c72d9d1a7b2d7314c (patch) | |
tree | 0dd89714f15a9ca8956957cfd991a9b6765044dc /lib/ansible/modules/debconf.py | |
parent | Adding upstream version 2.17.2. (diff) | |
download | ansible-core-upstream.tar.xz ansible-core-upstream.zip |
Adding upstream version 2.17.3.upstream/2.17.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/modules/debconf.py')
-rw-r--r-- | lib/ansible/modules/debconf.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/modules/debconf.py b/lib/ansible/modules/debconf.py index 779952e..259d92b 100644 --- a/lib/ansible/modules/debconf.py +++ b/lib/ansible/modules/debconf.py @@ -173,8 +173,6 @@ def set_selection(module, pkg, question, vtype, value, unseen): if unseen: cmd.append('-u') - if vtype == 'boolean': - value = value.lower() data = ' '.join([pkg, question, vtype, value]) return module.run_command(cmd, data=data) @@ -209,15 +207,17 @@ def main(): if vtype is None or value is None: module.fail_json(msg="when supplying a question you must supply a valid vtype and value") + # ensure we compare booleans supplied to the way debconf sees them (true/false strings) + if vtype == 'boolean': + value = to_text(value).lower() + # if question doesn't exist, value cannot match if question not in prev: changed = True else: existing = prev[question] - # ensure we compare booleans supplied to the way debconf sees them (true/false strings) if vtype == 'boolean': - value = to_text(value).lower() existing = to_text(prev[question]).lower() elif vtype == 'password': existing = get_password_value(module, pkg, question, vtype) |