Changeset View
Changeset View
Standalone View
Standalone View
Vagrantfile
Vagrant.require_version ">= 2.2.0" | Vagrant.require_version ">= 2.2.0" | ||||
ENV["LC_ALL"] = "en_US.UTF-8" | ENV["LC_ALL"] = "en_US.UTF-8" | ||||
tmpdir = "/var/tmp/puppet" | |||||
# Default configuration for all defines node below | # Default configuration for all defines node below | ||||
environment_path = "/tmp/puppet/environments" | environment_path = "#{tmpdir}/environments" | ||||
manifest_file = "site.pp" | manifest_file = "site.pp" | ||||
manifests_path = "swh-site/manifests" | manifests_path = "swh-site/manifests" | ||||
puppet_options = "--fileserverconfig=/etc/puppet/fileserver.conf --verbose" # --debug --trace" | puppet_options = "--fileserverconfig=/etc/puppet/fileserver.conf --verbose" # --debug --trace" | ||||
# used to define the local vm template path | # used to define the local vm template path | ||||
puppet_env_path = ENV["SWH_PUPPET_ENVIRONMENT_HOME"] | puppet_env_path = ENV["SWH_PUPPET_ENVIRONMENT_HOME"] | ||||
install_facts_script_path = "vagrant/puppet_agent/install_facts.sh" | install_facts_script_path = "vagrant/puppet_agent/install_facts.sh" | ||||
# Images/local configuration (libvirt) | # Images/local configuration (libvirt) | ||||
▲ Show 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | vms.each do | vm_name, vm_props | | ||||
# config.ssh.insert_key = false | # config.ssh.insert_key = false | ||||
config.vm.box = vm_props[:box] ? vm_props[:box] : $global_debian10_box | config.vm.box = vm_props[:box] ? vm_props[:box] : $global_debian10_box | ||||
config.vm.box_url = vm_props[:box_url] ? vm_props[:box_url] : $global_debian10_box_url | config.vm.box_url = vm_props[:box_url] ? vm_props[:box_url] : $global_debian10_box_url | ||||
config.vm.box_check_update = false | config.vm.box_check_update = false | ||||
config.vm.hostname = vm_props[:hostname] | config.vm.hostname = vm_props[:hostname] | ||||
config.vm.network :private_network, ip: vm_props[:ip], netmask: "255.255.0.0" | config.vm.network :private_network, ip: vm_props[:ip], netmask: "255.255.0.0" | ||||
# Using nfs v4 to avoid using the default nfs v3 on udp not supported by the debian 11 kernel | # Using nfs v4 to avoid using the default nfs v3 on udp not supported by the debian 11 kernel | ||||
config.vm.synced_folder "/tmp/puppet/", _mount_point_puppet, type: 'nfs', nfs_version:4 | config.vm.synced_folder tmpdir, _mount_point_puppet, type: 'nfs', nfs_version:4 | ||||
# Hack to speed up the puppet provisioner rsync | # Hack to speed up the puppet provisioner rsync | ||||
# It will synchronize between the same source and destination | # It will synchronize between the same source and destination | ||||
config.vm.synced_folder "/tmp/puppet/", '/vagrant', type: 'nfs', nfs_version:4 | config.vm.synced_folder tmpdir, '/vagrant', type: 'nfs', nfs_version:4 | ||||
config.vm.synced_folder "/tmp/puppet/", '/vagrant-puppet', type: 'nfs', nfs_version:4 | config.vm.synced_folder tmpdir, '/vagrant-puppet', type: 'nfs', nfs_version:4 | ||||
# ssl certificates share | # ssl certificates share | ||||
config.vm.synced_folder "vagrant/le_certs", "/var/lib/puppet/letsencrypt_exports", type: 'nfs', nfs_version:4 | config.vm.synced_folder "vagrant/le_certs", "/var/lib/puppet/letsencrypt_exports", type: 'nfs', nfs_version:4 | ||||
config.vm.provider :libvirt do |provider| | config.vm.provider :libvirt do |provider| | ||||
provider.memory = vm_props[:memory] | provider.memory = vm_props[:memory] | ||||
provider.cpus = vm_props[:cpus] | provider.cpus = vm_props[:cpus] | ||||
# local test run: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/45 | # local test run: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/45 | ||||
Show All 34 Lines |