feat: moved network to separate template, additional packages loop, fixed qemu-guest-agent install
This commit is contained in:
@@ -9,12 +9,11 @@ autoinstall:
|
|||||||
uri: http://archive.ubuntu.com/ubuntu
|
uri: http://archive.ubuntu.com/ubuntu
|
||||||
- arches: [default]
|
- arches: [default]
|
||||||
uri: http://ports.ubuntu.com/ubuntu-ports
|
uri: http://ports.ubuntu.com/ubuntu-ports
|
||||||
early-commands:
|
|
||||||
- sudo systemctl stop ssh
|
|
||||||
locale: ${vm_os_language}
|
locale: ${vm_os_language}
|
||||||
keyboard:
|
keyboard:
|
||||||
layout: ${vm_os_keyboard}
|
layout: ${vm_os_keyboard}
|
||||||
${storage}
|
${storage}
|
||||||
|
${network}
|
||||||
identity:
|
identity:
|
||||||
hostname: ubuntu-server
|
hostname: ubuntu-server
|
||||||
username: ${build_username}
|
username: ${build_username}
|
||||||
@@ -24,8 +23,10 @@ ${storage}
|
|||||||
allow-pw: true
|
allow-pw: true
|
||||||
packages:
|
packages:
|
||||||
- openssh-server
|
- openssh-server
|
||||||
- qemu-guest-agent
|
|
||||||
- cloud-init
|
- cloud-init
|
||||||
|
%{ for package in additional_packages ~}
|
||||||
|
- ${package}
|
||||||
|
%{ endfor ~}
|
||||||
user-data:
|
user-data:
|
||||||
disable_root: false
|
disable_root: false
|
||||||
timezone: ${vm_os_timezone}
|
timezone: ${vm_os_timezone}
|
||||||
@@ -33,3 +34,5 @@ ${storage}
|
|||||||
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
|
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
|
||||||
- echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username}
|
- echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username}
|
||||||
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username}
|
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username}
|
||||||
|
- curtin in-target -- apt-get update
|
||||||
|
- curtin in-target -- apt-get install qemu-guest-agent
|
||||||
|
|||||||
Reference in New Issue
Block a user