Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add a vagrant config to spin multiple vms #2473

Merged
merged 1 commit into from Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -128,3 +128,6 @@ quipucords/roles/

# local files
var/

# vagrant data
.vagrant/
21 changes: 21 additions & 0 deletions Vagrantfile
@@ -0,0 +1,21 @@
Vagrant.configure("2") do |config|
# unnoficial RHEL images
(6..9).each do |n|
config.vm.define "rhel%d" % n do |vmconfig|
vmconfig.vm.box = "generic/rhel%d" % n
end
end
# unnoficial centos stream images (for testing purposes we can consider them RHEL-like)
(8..9).each do |n|
config.vm.define "stream%d" % n do |vmconfig|
# we could use the official "centos/stream%d" images, but I'm unable to boot stream9 :'(
bruno-fs marked this conversation as resolved.
Show resolved Hide resolved
vmconfig.vm.box = "generic/centos%ds" % n
end
end
# allow ssh'ing with password authentication (username and password is "vagrant")
config.vm.provision "shell", inline: <<-EOF
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
# fallback to service for systems that don't use systemd
systemctl restart sshd.service || service sshd restart
bruno-fs marked this conversation as resolved.
Show resolved Hide resolved
EOF
end