]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_config: compare current vals in low
authorSeena Fallah <seenafallah@gmail.com>
Sat, 16 Mar 2024 15:41:10 +0000 (16:41 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 19 Mar 2024 09:01:07 +0000 (10:01 +0100)
Check the current value and asked both in low case as the asked one might be in capital as it should be.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit ed4b6e71b3b832848e326ccafd9ba4fb036a5f8c)

library/ceph_config.py

index 3557b34da618171b3369c4cffe77d3cdd4206ab5..c82c8cf57c7278230008a06de28ec21beef60845 100644 (file)
@@ -183,7 +183,7 @@ def main() -> None:
     current_value = get_current_value(who, option, config_dump)
 
     if action == 'set':
-        if value.lower() == current_value:
+        if current_value and value.lower() == current_value.lower():
             out = 'who={} option={} value={} already set. Skipping.'.format(who, option, value)
         else:
             rc, cmd, out, err = set_option(module, who, option, value, container_image=container_image)