Victor Morales | fa9eb9c | 2017-12-18 09:56:13 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export VAGRANT_DEFAULT_PROVIDER=libvirt |
| 4 | |
| 5 | source /etc/os-release || source /usr/lib/os-release |
| 6 | case ${ID,,} in |
| 7 | *suse) |
| 8 | ;; |
| 9 | ubuntu|debian) |
| 10 | # vagrant-libvirt dependencies |
| 11 | sudo apt-get install -y qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev |
| 12 | |
| 13 | # NFS |
| 14 | sudo apt-get install -y nfs-kernel-server |
| 15 | ;; |
| 16 | rhel|centos|fedora) |
| 17 | PKG_MANAGER=$(which dnf || which yum) |
| 18 | sudo $PKG_MANAGER install -y qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm |
| 19 | ;; |
| 20 | esac |
| 21 | vagrant plugin install vagrant-libvirt |