Skip to content

Commit

Permalink
fix: remove useless package, early command & create default user to a…
Browse files Browse the repository at this point in the history
…void ubuntu user
  • Loading branch information
M0NsTeRRR committed Mar 15, 2024
1 parent 513828b commit 6dcc343
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions packer/cloud-config/user-data.pkrtpl.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ autoinstall:
refresh-installer:
update: true
updates: "all"
early-commands:
# workaround to stop ssh for packer as it thinks it timed out
- sudo systemctl stop ssh
locale: en_US.UTF-8
keyboard:
layout: fr
variant: latin9
timezone: Europe/Paris
packages:
- openssh-server
- qemu-guest-agent
- cloud-init
identity:
hostname: ${build_hostname}
realname: ${build_fullname}
username: ${build_username}
password: ${build_password_encrypted}
ssh:
install-server: yes
authorized-keys:
- ${build_authorized_key}
authorized-keys: []
allow-pw: no
storage:
layout:
name: direct
name: direct
user-data:
default_user:
name: ${build_username}
gecos: ${build_fullname}
hashed_passwd: ${build_password_encrypted}
ssh_authorized_keys:
- ${build_authorized_key}

0 comments on commit 6dcc343

Please sign in to comment.