Compare commits

...

2 Commits

Author SHA1 Message Date
846ded0e57 Fix weird spacing 2021-12-19 21:39:36 -05:00
7dfea80d2d Fix period finding and failures 2021-12-19 20:55:19 -05:00
2 changed files with 9 additions and 6 deletions

View File

@ -19,22 +19,22 @@ debrelease="{{ debrelease }}"
{%- if debmirror is defined and debmirror %}
# The Debian mirror to use (overrides the default)
debmirror="{{ debmirror }}"
{%- endif %}
{% endif %}
{%- if addpkglist is defined and addpkglist %}
# Additional packages (comma-separated) to install in the base system
addpkglist="{{ addpkglist }}"
{%- endif %}
{% endif %}
{%- if filesystem is defined and filesystem %}
# Alternate filesystem for system volumes (/, /var/lib/ceph, /var/lib/zookeeper)
filesystem="{{ filesystem }}"
{%- endif %}
{% endif %}
{%- if skip_blockcheck is defined and skip_blockcheck %}
# Skip block zeroing; only recommended for testing, slow, low-endurance, or known-zeroed block devices.
skip_blockcheck="y"
{%- endif %}
{% endif %}
###
### Per-host definitions (required)

View File

@ -243,8 +243,11 @@ seed_config() {
is_match="$(
python <<EOF
from re import sub
b_size = float(sub(r'\D','','${b_size}'))
t_size = float(sub(r'\D','','${size}'))
try:
b_size = float(sub(r'\D.','','${b_size}'))
t_size = float(sub(r'\D.','','${size}'))
except ValueError:
exit(0)
plustwopct = t_size * 1.02
minustwopct = t_size * 0.98
if b_size > minustwopct and b_size < plustwopct: