forked from tim/k3s-ansible
fix(ci): configure Ubuntu box prewarming
- Use the Molecule Ubuntu SSH settings when creating its linked-clone master - Bound a prewarm SSH failure to ten minutes - Verify the generated Vagrantfile in the master-preparation fixture
This commit is contained in:
committed by
Techno Tim
parent
4c50fbbe10
commit
bbca35331d
@@ -70,9 +70,19 @@ write_prewarm_vagrantfile() {
|
||||
printf '%s\n' "Vagrant.configure('2') do |config|"
|
||||
printf ' config.vm.box = "%s"\n' "$box"
|
||||
printf ' config.vm.box_version = "%s"\n' "$version"
|
||||
# generic/ubuntu2204 does not accept Vagrant's bundled insecure key.
|
||||
# Match the repository's Molecule connection settings for the short-lived
|
||||
# prewarm clone so Vagrant can record its linked-clone master.
|
||||
if [[ "$box" == 'generic/ubuntu2204' ]]; then
|
||||
printf '%s\n' \
|
||||
' config.ssh.username = "vagrant"' \
|
||||
' config.ssh.password = "vagrant"' \
|
||||
' config.ssh.insert_key = false'
|
||||
fi
|
||||
printf '%s\n' \
|
||||
' config.vm.synced_folder ".", "/vagrant", disabled: true' \
|
||||
' config.vm.hostname = "k3s-ansible-box-prewarm"' \
|
||||
' config.vm.boot_timeout = 600' \
|
||||
' config.vm.provider "virtualbox" do |virtualbox|' \
|
||||
' virtualbox.linked_clone = true' \
|
||||
' virtualbox.memory = 512' \
|
||||
|
||||
Reference in New Issue
Block a user