summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorPeter A. Bigot <pab@pabigot.com>2024-07-18 21:50:31 +0200
committerGitHub <noreply@github.com>2024-07-18 21:50:31 +0200
commitc904bffc7d09f23b11e8d2423fe0a59c577e22f4 (patch)
tree90af5d80720cb733adb22d967a48ac2b6e5a5ef7 /test/integration
parentreplace - fix documentation and remove ignore clauses (#83574) (diff)
downloadansible-c904bffc7d09f23b11e8d2423fe0a59c577e22f4.tar.xz
ansible-c904bffc7d09f23b11e8d2423fe0a59c577e22f4.zip
debconf: handle boolean value representation consistently (#83601)
* lift code that normalizes value type for boolean vtype to cover both branches of conditional. * remove obsolete and incomplete conversion of type in set_selection. Fixes: #83594 Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/debconf/tasks/main.yml28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/integration/targets/debconf/tasks/main.yml b/test/integration/targets/debconf/tasks/main.yml
index 4021349f17..1b5877e034 100644
--- a/test/integration/targets/debconf/tasks/main.yml
+++ b/test/integration/targets/debconf/tasks/main.yml
@@ -146,6 +146,32 @@
- not debconf_multiselect_test_idem_4.changed
- '"Invalid value provided" in debconf_multiselect_test_idem_4.msg'
+ - name: Boolean vtype from boolean value
+ debconf:
+ name: libnns-ldap
+ question: libnss-ldapd/clean_nsswitch
+ vtype: boolean
+ value: true
+ register: debconf_bool_test_bool_1
+
+ - name: validate results for boolean vtype from boolean value
+ assert:
+ that:
+ - debconf_bool_test_bool_1.changed
+
+ - name: Boolean vtype from string value
+ debconf:
+ name: libnns-ldap
+ question: libnss-ldapd/clean_nsswitch
+ vtype: boolean
+ value: "FALSE"
+ register: debconf_bool_test_bool_2
+
+ - name: validate results for boolean vtype from string value
+ assert:
+ that:
+ - debconf_bool_test_bool_2.changed
+
always:
- name: uninstall debconf-utils
apt:
@@ -153,4 +179,4 @@
state: absent
when: debconf_utils_deb_install is changed
- when: ansible_distribution in ('Ubuntu', 'Debian') \ No newline at end of file
+ when: ansible_distribution in ('Ubuntu', 'Debian')