tatu/scripts/vendor-data-to-cloud-config
2017-11-01 02:28:51 +00:00

14 lines
246 B
Python
Executable File

#!/usr/bin/env python
import sys
import json
import yaml
# load from file:
with open(sys.argv[1], 'r') as f:
js = json.loads(f.read())
# save to file:
#with open(sys.argv[2], 'w') as f:
# f.write(js['cloud-init'])
print js['cloud-init']