2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-27 12:00:10 +00:00
confluent/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/addcrypt
Jarrod Johnson 58ee85f39e Rework Ubuntu addcrypt support
The comment based hook is destroyed during early install process.

Use python to manipulate the autoinstall file in a more sophisticated way.

Also refactor the initramfs hook material to be standalone files.
2024-07-26 11:33:01 -04:00

13 lines
252 B
Plaintext

import yaml
import sys
ainst = {}
with open('/autoinstall.yaml', 'r') as allin:
ainst = yaml.safe_load(allin)
ainst['storage']['layout']['password'] = sys.argv[1]
with open('/autoinstall.yaml', 'w') as allout:
yaml.safe_dump(ainst, allout)