|
|
|
@ -117,15 +117,3 @@ system_info:
|
|
|
|
|
primary: http://ports.ubuntu.com/ubuntu-ports
|
|
|
|
|
security: http://ports.ubuntu.com/ubuntu-ports
|
|
|
|
|
ssh_svcname: ssh
|
|
|
|
|
|
|
|
|
|
runcmd:
|
|
|
|
|
- - "python3"
|
|
|
|
|
- "-c"
|
|
|
|
|
- |
|
|
|
|
|
import subprocess, sys, yaml
|
|
|
|
|
user_data = yaml.safe_load(subprocess.run([
|
|
|
|
|
"cloud-init", "query", "userdata"],
|
|
|
|
|
check=True, stdout=subprocess.PIPE, encoding='utf-8').stdout)
|
|
|
|
|
if user_data is not None and 'autoinstall' in user_data:
|
|
|
|
|
with open("/autoinstall.yaml", "w") as fp:
|
|
|
|
|
yaml.dump(user_data['autoinstall'], fp)
|
|
|
|
|