Files
novajoin/tools/cloud-config-pack.py
Grzegorz Grasza 6506855623 Helper scripts for modifying cloud-config-novajoin.json
Adding two helper scripts to unpack cloud-config-novajoin.json to a more
readable form. After editing cloud-config-novajoin.yaml, it still has to
be packed into cloud-config-novajoin.json with tools/cloud-config-pack.py.

Related-Bug: 1836529
Change-Id: I3d6a3e5f97608f7f8a0070f40ddeb8a7113c33b3
2019-08-28 12:23:59 +02:00

10 lines
299 B
Python
Executable File

#!/usr/bin/env python
import json
with open('files/cloud-config-novajoin.yaml') as config_unpacked:
config = config_unpacked.read()
with open('files/cloud-config-novajoin.json', 'w') as cloud_config:
json.dump({'cloud-init': config}, cloud_config)
cloud_config.write('\n')