mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
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:
@@ -231,7 +231,7 @@ class InventoryScript(HasCopy, HasCreate, base.Base):
|
|||||||
'inventory["{0}"]["vars"] = dict(ansible_host="127.0.0.1", ansible_connection="local")',
|
'inventory["{0}"]["vars"] = dict(ansible_host="127.0.0.1", ansible_connection="local")',
|
||||||
'print(json.dumps(inventory))'
|
'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 = [
|
host_names = [
|
||||||
re.sub(
|
re.sub(
|
||||||
r"[\':]",
|
r"[\':]",
|
||||||
|
|||||||
Reference in New Issue
Block a user