diff --git a/tests/scripts/generate_ssh_config.sh b/tests/scripts/generate_ssh_config.sh index feebaf676c..60e00cf017 100644 --- a/tests/scripts/generate_ssh_config.sh +++ b/tests/scripts/generate_ssh_config.sh @@ -2,6 +2,8 @@ # Generate a custom ssh config from Vagrant so that it can then be used by # ansible.cfg +echo $PWD + path=$1 if [ $# -eq 0 ] diff --git a/tests/scripts/vagrant.sh b/tests/scripts/vagrant.sh new file mode 100644 index 0000000000..492c19176d --- /dev/null +++ b/tests/scripts/vagrant.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +vagrant(){ + podman run -it --rm \ + -e LIBVIRT_DEFAULT_URI \ + -e SSH_AUTH_SOCK="${SSH_AUTH_SOCK}" \ + -v /var/run/libvirt/:/var/run/libvirt/ \ + -v ~/.vagrant.d:/.vagrant.d \ + -v $(realpath "${PWD}"):${PWD} \ + -w "${PWD}" \ + --network host \ + --entrypoint /bin/bash \ + --security-opt label=disable \ + docker.io/vagrantlibvirt/vagrant-libvirt:latest \ + vagrant $@ +} diff --git a/tests/scripts/vagrant_up.sh b/tests/scripts/vagrant_up.sh index 05b17582f4..8826a241c6 100644 --- a/tests/scripts/vagrant_up.sh +++ b/tests/scripts/vagrant_up.sh @@ -1,5 +1,10 @@ #!/bin/bash set -x + +source vagrant.sh + +test -d ~/.vagrant.d || mkdir ~/.vagrant.d + if [[ -n $1 ]]; then DIRECTORY=$1 shift