Skip to content

Commit 6be879a

Browse files
committed
try using packer's ssh_clear_authorized_keys instead of ansible
1 parent f35ec4c commit 6be879a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

openstack.pkr.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ source "openstack" "openhpc" {
3131
ssh_bastion_username = "${var.ssh_bastion_username}"
3232
ssh_bastion_private_key_file = "~/.ssh/id_rsa"
3333
image_name = "${source.name}-${local.timestamp}.qcow2"
34+
ssh_clear_authorized_keys = true
3435
}
3536

3637
build {

roles/builder/tasks/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,5 @@
3838
state: absent
3939
become: yes
4040

41-
- name: Delete injected ssh key
42-
file:
43-
path: /home/rocky/.ssh/authorized_keys
44-
state: absent
45-
become: yes
4641

4742
# - meta: end_here # useful for debugging, can rerun

0 commit comments

Comments
 (0)