This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sysconfig/Vagrantfile

30 lines
1002 B
Ruby

# Provisioning step gets executed after folder syncing step
$provision_script = <<-SCRIPT
rc-service openntpd stop && rc-update del openntpd && apk del openntpd
apk add ansible-core grub
ansible-galaxy collection install -r /vagrant/requirements/collections.yml
mkdir -pv /vagrant/host_vars
echo \"vault_password: \'123456\'\" > /vagrant/host_vars/localhost.yml
SCRIPT
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.configure("2") do |config|
config.vm.define :sysconfig do |sysconfig|
sysconfig.vm.box = "generic/alpine315"
sysconfig.vm.provider :libvirt do |libvirt|
libvirt.cpus = 2
libvirt.memory = 512
# Use the default NAT network of libvirt
libvirt.management_network_name = "default"
libvirt.management_network_address = "192.168.122.0/24"
end
sysconfig.vm.provision "shell", inline: $provision_script
sysconfig.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: [".git/", "Vagrantfile", ".gitignore"]
end
end