History rewrite
This commit is contained in:
35
builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl
Normal file
35
builds/linux/ubuntu/20-04-lts/data/user-data.pkrtpl.hcl
Normal file
@@ -0,0 +1,35 @@
|
||||
#cloud-config
|
||||
autoinstall:
|
||||
version: 1
|
||||
apt:
|
||||
geoip: true
|
||||
preserve_sources_list: false
|
||||
primary:
|
||||
- arches: [amd64, i386]
|
||||
uri: http://archive.ubuntu.com/ubuntu
|
||||
- arches: [default]
|
||||
uri: http://ports.ubuntu.com/ubuntu-ports
|
||||
early-commands:
|
||||
- sudo systemctl stop ssh
|
||||
locale: ${vm_os_language}
|
||||
keyboard:
|
||||
layout: ${vm_os_keyboard}
|
||||
${storage}
|
||||
identity:
|
||||
hostname: ubuntu-server
|
||||
username: ${build_username}
|
||||
password: ${build_password_encrypted}
|
||||
ssh:
|
||||
install-server: true
|
||||
allow-pw: true
|
||||
packages:
|
||||
- openssh-server
|
||||
- qemu-guest-agent
|
||||
- cloud-init
|
||||
user-data:
|
||||
disable_root: false
|
||||
timezone: ${vm_os_timezone}
|
||||
late-commands:
|
||||
- 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}
|
||||
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username}
|
||||
Reference in New Issue
Block a user