Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions image-templates/aws-hvm.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"scripts/aws/cloud-init-enable.sh",
"scripts/aws/sriov.sh",
"scripts/common/nic.sh",
"scripts/common/cleanup.sh"
"scripts/common/cleanup.sh",
"scripts/common/clear_root_authkeys.sh"
]
},
{
Expand All @@ -70,4 +71,4 @@
"post-processors":
[
]
}
}
5 changes: 3 additions & 2 deletions image-templates/aws-paravirt.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"scripts/aws/aws-modules.sh",
"scripts/aws/cloud-init-enable.sh",
"scripts/common/nic.sh",
"scripts/common/cleanup.sh"
"scripts/common/cleanup.sh",
"scripts/common/clear_root_authkeys.sh"
]
},
{
Expand All @@ -69,4 +70,4 @@
"post-processors":
[
]
}
}
5 changes: 3 additions & 2 deletions image-templates/vagrant.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"scripts/vagrant/vbox-guest-additions.sh",
"scripts/vagrant/vagrant-user.sh",
"scripts/common/nic.sh",
"scripts/common/cleanup.sh"
"scripts/common/cleanup.sh",
"scripts/common/clear_root_authkeys.sh"
]
},
{
Expand All @@ -69,4 +70,4 @@
"output" : "images/{{user `image_type`}}/{{user `vm_name`}}-{{ user `timestamp`}}.box"
}
]
}
}
5 changes: 3 additions & 2 deletions image-templates/virtualbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"scripts/virtualbox/packages.sh",
"scripts/virtualbox/serial.sh",
"scripts/virtualbox/sshd.sh",
"scripts/common/nic.sh"
"scripts/common/nic.sh",
"scripts/common/cleanup.sh"
]
},
{
Expand All @@ -82,4 +83,4 @@
"script" : "tests/serverspec.sh"
}
]
}
}
3 changes: 0 additions & 3 deletions scripts/common/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ yum clean all
if [ -f /tmp/VBoxGuestAdditions.iso ]; then
rm /tmp/VBoxGuestAdditions.iso
fi

# Delete builder key.
echo > /root/.ssh/authorized_keys
6 changes: 6 additions & 0 deletions scripts/common/clear_root_authkeys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh -x
#
# This script should be included by every build except virtualbox

# Delete builder key.
echo > /root/.ssh/authorized_keys