From: Frank Brehm Date: Wed, 13 Nov 2019 17:26:25 +0000 (+0100) Subject: Changing check for valid Puppet role name X-Git-Tag: 1.3.8^2~1 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=66e4c84e869885a23380ab48f0e38c2c78cb1ecf;p=pixelpark%2Fcreate-terraform.git Changing check for valid Puppet role name --- diff --git a/lib/cr_tf/terraform/vm.py b/lib/cr_tf/terraform/vm.py index 782b1d1..4fd19dd 100644 --- a/lib/cr_tf/terraform/vm.py +++ b/lib/cr_tf/terraform/vm.py @@ -37,7 +37,7 @@ from .disk import TerraformDisk, TerraformDiskDict from .interface import TerraformInterface -__version__ = '1.4.3' +__version__ = '1.4.4' LOG = logging.getLogger(__name__) @@ -121,6 +121,7 @@ class TerraformVm(HandlingObject): re_memory_value = re.compile(r'^\s*(\d+(?:\.\d*)?)\s*(?:(\D+)\s*)?$') re_invalid_chars = re.compile(r'[^a-z0-9@\._-]', re.IGNORECASE) + re_invalid_chars_role = re.compile(r'[^a-z0-9:@\._-]', re.IGNORECASE) re_disk_size = re.compile(r'^\s*size\s*$', re.IGNORECASE) re_disk_mountpoint = re.compile(r'^\s*mount[_-]?point\s*$', re.IGNORECASE) @@ -466,7 +467,7 @@ class TerraformVm(HandlingObject): return True if cls.re_key_puppet_role.search(key) and val_stripped: - if cls.re_invalid_chars.search(val_stripped): + if cls.re_invalid_chars_role.search(val_stripped): LOG.error(_("Invalid puppet role {!r}.").format(value)) else: vm.puppet_role = val_stripped