Fix bug dealing with spaces in exports

This commit is contained in:
Michael Chapman
2013-11-01 14:45:23 +11:00
parent bf5b568b05
commit e50744ecf8

View File

@@ -27,7 +27,9 @@ def facter_config():
print meta
with open('/root/fact_exports', 'w') as facts:
for key,value in meta.items():
facts.write('FACTER_' + str(key) + '="' + str(value) + '"\n')
# Things with spaces can't be exported
if ' ' not in value:
facts.write('FACTER_' + str(key) + '="' + str(value) + '"\n')
#TODO
def hostname_config():