refactor: move Packer templates to top-level packer/ directory
This commit is contained in:
41
packer/ubuntu-24.04/http/user-data-v2
Normal file
41
packer/ubuntu-24.04/http/user-data-v2
Normal file
@@ -0,0 +1,41 @@
|
||||
#cloud-config
|
||||
autoinstall:
|
||||
version: 1
|
||||
early-commands:
|
||||
# Stop ssh for packer
|
||||
- sudo systemctl stop ssh
|
||||
locale: en_US
|
||||
keyboard:
|
||||
layout: us
|
||||
identity:
|
||||
hostname: ubuntu-server
|
||||
username: wed
|
||||
password: '$1$Cc71g3Aa$WUMTLZg7B94dhHdxT7J/P/'
|
||||
ssh:
|
||||
install-server: yes
|
||||
allow-pw: yes
|
||||
storage:
|
||||
layout:
|
||||
name: lvm
|
||||
apt:
|
||||
geoip: true
|
||||
primary:
|
||||
- arches: [i386, amd64]
|
||||
uri: "http://archive.ubuntu.com/ubuntu"
|
||||
# packages:
|
||||
# - curl
|
||||
# - unzip
|
||||
# - openssh-server
|
||||
# - util-linux-extra
|
||||
# - qemu-guest-agent
|
||||
# - cloud-init
|
||||
user-data:
|
||||
disable_root: false
|
||||
late-commands:
|
||||
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
|
||||
- sed -i -e 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /target/etc/ssh/sshd_config
|
||||
- echo 'wed ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/wed
|
||||
- curtin in-target --target=/target -- vmware-toolbox-cmd config set deployPkg enable-custom-scripts true
|
||||
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/wed
|
||||
- curtin in-target --target=/target -- apt-get update
|
||||
- curtin in-target --target=/target -- apt-get upgrade --yes
|
||||
Reference in New Issue
Block a user