mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-08-08 23:13:19 +02:00
fix(ci): align Vagrant prewarm profile
- Match the minimum CPU and memory used by Ubuntu Molecule platforms - Restore Vagrant's normal key insertion after password authentication - Cover the canonical prewarm configuration in the fixture
This commit is contained in:
committed by
Techno Tim
parent
bbca35331d
commit
2babd39c89
@@ -76,8 +76,7 @@ write_prewarm_vagrantfile() {
|
||||
if [[ "$box" == 'generic/ubuntu2204' ]]; then
|
||||
printf '%s\n' \
|
||||
' config.ssh.username = "vagrant"' \
|
||||
' config.ssh.password = "vagrant"' \
|
||||
' config.ssh.insert_key = false'
|
||||
' config.ssh.password = "vagrant"'
|
||||
fi
|
||||
printf '%s\n' \
|
||||
' config.vm.synced_folder ".", "/vagrant", disabled: true' \
|
||||
@@ -85,8 +84,8 @@ write_prewarm_vagrantfile() {
|
||||
' config.vm.boot_timeout = 600' \
|
||||
' config.vm.provider "virtualbox" do |virtualbox|' \
|
||||
' virtualbox.linked_clone = true' \
|
||||
' virtualbox.memory = 512' \
|
||||
' virtualbox.cpus = 1' \
|
||||
' virtualbox.memory = 1024' \
|
||||
' virtualbox.cpus = 2' \
|
||||
' end' \
|
||||
'end'
|
||||
} > "$destination"
|
||||
|
||||
@@ -47,7 +47,12 @@ third_output="$fixture/third-output"
|
||||
"$script" > "$first_output"
|
||||
grep -Fq 'config.ssh.username = "vagrant"' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'config.ssh.password = "vagrant"' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'config.ssh.insert_key = false' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
if grep -Fq 'config.ssh.insert_key' "$MOCK_VAGRANTFILE_CAPTURE"; then
|
||||
printf 'prewarm Vagrantfile unexpectedly overrides Vagrant SSH key insertion\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -Fq 'virtualbox.memory = 1024' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'virtualbox.cpus = 2' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'config.vm.boot_timeout = 600' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
mapping_file="$mock_master_root/generic_ubuntu2204-4.3.12-amd64.uuid"
|
||||
test -s "$mapping_file"
|
||||
|
||||
Reference in New Issue
Block a user