Merge pull request #868 from Security-Onion-Solutions/bugfix/fleet-custom-hostname

Fleet custom hostname regex fix
This commit is contained in:
Josh Brower
2020-06-17 14:46:07 -04:00
committed by GitHub

View File

@@ -82,7 +82,7 @@ def run():
# Update the Fleet host in the static pillar
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)
return {}