ci: Cleanup kubevirt_vm integration test

- Use uniform way of naming plays, tasks and VMs
- Use uniform way of ordering task parameters
- Use defaults where possible
- Use CentOS 9 Stream instancetype and preference
- Generate SSH private key with empty password (-N "")
- Disable strict host key checking
- Add .gitignore for test files
- Fix skipping test key creation if already existent

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2024-03-01 15:33:01 +01:00
parent b928cb5b29
commit ed642885ab
4 changed files with 26 additions and 28 deletions

View File

@@ -4,14 +4,13 @@ set -o pipefail
export ANSIBLE_CALLBACKS_ENABLED=ansible.posix.profile_tasks
export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt
export ANSIBLE_HOST_KEY_CHECKING=False
[ -d files ] || mkdir files
[ -f files/priv_key ] || (ssh-keygen -t ed25519 -C test@test -f files/priv_key ; ssh-keygen -y -f files/priv_key > files/pub_key)
[ -f files/testkey ] || (ssh-keygen -t ed25519 -C test@test -f files/testkey -N "")
ansible-playbook playbook.yml "$@"
ansible-inventory -i test.kubevirt.yml -y --list "$@"
ansible-playbook verify.yml -i test.kubevirt.yml --private-key=files/priv_key "$@"
rm "$HOME/.ssh/known_hosts"
ansible-playbook verify.yml -i test.kubevirt.yml --private-key=files/testkey "$@"