Merge pull request #8617 from AlanCoding/valid_groups

Avoid invalid group characters in default inventory script factory

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-11-18 20:26:28 +00:00 committed by GitHub
commit f22fa9c5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,7 @@ class InventoryScript(HasCopy, HasCreate, base.Base):
'inventory["{0}"]["vars"] = dict(ansible_host="127.0.0.1", ansible_connection="local")',
'print(json.dumps(inventory))'
])
group_name = re.sub(r"[\']", "", "group-{}".format(random_utf8()))
group_name = re.sub(r"[\']", "", "group_{}".format(random_title(non_ascii=False)))
host_names = [
re.sub(
r"[\':]",