Fleet custom hostname regex fix

This commit is contained in:
Josh Brower
2020-06-17 13:08:47 -04:00
parent 6bf8f0af08
commit 3418f5748c

View File

@@ -82,7 +82,7 @@ def run():
# Update the Fleet host in the static pillar # Update the Fleet host in the static pillar
for line in fileinput.input(STATICFILE, inplace=True): for line in fileinput.input(STATICFILE, inplace=True):
line = re.sub(r'fleet_custom_hostname: \S*', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip()) line = re.sub(r'fleet_custom_hostname:.*\n', f"fleet_custom_hostname: {CUSTOMHOSTNAME}", line.rstrip())
print(line) print(line)
return {} return {}