Skip to content

Commit

Permalink
Merge pull request #114 from cisagov/improvement/switch-to-ubuntu-to-…
Browse files Browse the repository at this point in the history
…build-an-arm64-ami

Correct default user name in `shell` provisioner
  • Loading branch information
jsf9k authored Aug 23, 2024
2 parents 5b35e83 + 950590d commit d294243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packer.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ build {
# We need to call bash here because after hardening /tmp has the
# noexec bit set on it.
execute_command = "chmod +x {{ .Path }}; sudo env {{ .Vars }} bash {{ .Path }} ; rm -f {{ .Path }}"
inline = ["sed -i '/^users:/ {N; s/users:.*/users: []/g}' /etc/cloud/cloud.cfg", "rm --force /etc/sudoers.d/90-cloud-init-users", "rm --force /root/.ssh/authorized_keys", "/usr/sbin/userdel --remove --force admin"]
inline = ["sed -i '/^users:/ {N; s/users:.*/users: []/g}' /etc/cloud/cloud.cfg", "rm --force /etc/sudoers.d/90-cloud-init-users", "rm --force /root/.ssh/authorized_keys", "/usr/sbin/userdel --remove --force ubuntu"]
skip_clean = true
}
}

0 comments on commit d294243

Please sign in to comment.