[373577] Allow hostnames with underscores

- Use a different token in the tag representing bootaction key
  so that a hostname with a underscore doesn't cause a deployment
  failure

Change-Id: I6197494bfe28398300e38b5017ad94350204340e
This commit is contained in:
Scott Hussey 2018-04-27 09:34:10 -05:00
parent a9301c146b
commit 3e4849e132
1 changed files with 2 additions and 2 deletions

View File

@ -26,10 +26,10 @@ early_commands:
late_commands:
{{ "{{" }}py:
def find_ba_key(n):
tag_prefix = "%s_baid" % n.hostname
tag_prefix = "%s__baid" % n.hostname
for t in n.tag_names():
if t.startswith(tag_prefix):
prefix, ba_key = t.split('-')
prefix, ba_key = t.split('__baid__')
return ba_key
return False
{{ "}}" }}