fix(ansible): treat empty or auto redo capacity as unset

innodb_redo_log_capacity passed as '' or 'auto' from the delivery
payload previously bypassed the memory-based tier calculation and was
rendered verbatim into the instance config. Fall back to the automatic
tier when the value is empty or 'auto'.
This commit is contained in:
Hungerdream
2026-07-28 14:28:53 +08:00
parent b9a3ddd9e3
commit 7a800b0307
+1 -1
View File
@@ -334,7 +334,7 @@
# InnoDB redo log 容量:按内存梯度递增
# ≤4G→128M、≤16G→256M、≤32G→512M、>32G→1G
mysql_redo_capacity: >-
{{ innodb_redo_log_capacity if (innodb_redo_log_capacity is defined)
{{ innodb_redo_log_capacity if (innodb_redo_log_capacity is defined and (innodb_redo_log_capacity | string | lower) not in ['', 'auto'])
else ('128M' if (mysql_memory_gb | int) <= 4
else '256M' if (mysql_memory_gb | int) <= 16
else '512M' if (mysql_memory_gb | int) <= 32