Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9348024
D4113.id14489.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Subscribers
None
D4113.id14489.diff
View Options
diff --git a/Vagrantfile b/Vagrantfile
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,7 +1,17 @@
Vagrant.require_version ">= 2.2.0"
ENV["LC_ALL"] = "en_US.UTF-8"
-environment="staging"
+# Default configuration for all defines node below
+environment = "staging"
+environment_path = "/tmp/puppet/environments"
+manifest_file = "site.pp"
+manifests_path = "swh-site/manifests"
+puppet_options = "--verbose" # --debug --trace for more
+puppet_default_facts = {
+ "vagrant_testing" => "1",
+ "testing" => "vagrant",
+ "location" => "vagrant"
+}
# local configuration
#$global_debian10_box = "debian10-20201001-0747"
@@ -36,19 +46,13 @@
vb.cpus = 2
end
config.vm.provision "puppet" do |puppet|
- puppet.environment_path = "/tmp/puppet/environments"
+ puppet.environment_path = "#{environment_path}"
puppet.environment = "#{environment}"
puppet.hiera_config_path = "#{puppet.environment_path}/#{puppet.environment}/hiera-vagrant.yaml"
- puppet.manifest_file = "site.pp"
- puppet.manifests_path = "swh-site/manifests"
- puppet.options = "--verbose"
- # puppet.options = "--verbose --debug"
- # puppet.options = "--verbose --debug --trace"
- puppet.facter = {
- "vagrant_testing" => "1",
- "testing" => "vagrant",
- "location" => "vagrant"
- }
+ puppet.manifest_file = "#{manifest_file}"
+ puppet.manifests_path = "#{manifests_path}"
+ puppet.options = "#{puppet_options}"
+ puppet.facter = puppet_default_facts
end
end
@@ -71,19 +75,13 @@
end
config.vm.provision "puppet" do |puppet|
- puppet.environment_path = "/tmp/puppet/environments"
+ puppet.environment_path = "#{environment_path}"
puppet.environment = "#{environment}"
puppet.hiera_config_path = "#{puppet.environment_path}/#{puppet.environment}/hiera-vagrant.yaml"
- puppet.manifest_file = "site.pp"
- puppet.manifests_path = "swh-site/manifests"
- puppet.options = "--verbose"
- # puppet.options = "--verbose --debug"
- # puppet.options = "--verbose --debug --trace"
- puppet.facter = {
- "vagrant_testing" => "1",
- "testing" => "vagrant",
- "location" => "vagrant"
- }
+ puppet.manifest_file = "#{manifest_file}"
+ puppet.manifests_path = "#{manifests_path}"
+ puppet.options = "#{puppet_options}"
+ puppet.facter = puppet_default_facts
end
end
@@ -111,19 +109,13 @@
vb.cpus = 2
end
config.vm.provision "puppet" do |puppet|
- puppet.environment_path = "/tmp/puppet/environments"
+ puppet.environment_path = "#{environment_path}"
puppet.environment = "#{environment}"
puppet.hiera_config_path = "#{puppet.environment_path}/#{puppet.environment}/hiera-vagrant.yaml"
- puppet.manifest_file = "site.pp"
- puppet.manifests_path = "swh-site/manifests"
- puppet.options = "--verbose"
- # puppet.options = "--verbose --debug"
- # puppet.options = "--verbose --debug --trace"
- puppet.facter = {
- "vagrant_testing" => "1",
- "testing" => "vagrant",
- "location" => "vagrant"
- }
+ puppet.manifest_file = "#{manifest_file}"
+ puppet.manifests_path = "#{manifests_path}"
+ puppet.options = "#{puppet_options}"
+ puppet.facter = puppet_default_facts
end
end
@@ -149,19 +141,13 @@
end
config.vm.provision "puppet" do |puppet|
- puppet.environment_path = "/tmp/puppet/environments"
+ puppet.environment_path = "#{environment_path}"
puppet.environment = "#{environment}"
puppet.hiera_config_path = "#{puppet.environment_path}/#{puppet.environment}/hiera-vagrant.yaml"
- puppet.manifest_file = "site.pp"
- puppet.manifests_path = "swh-site/manifests"
- puppet.options = "--verbose"
- # puppet.options = "--verbose --debug"
- # puppet.options = "--verbose --debug --trace"
- puppet.facter = {
- "vagrant_testing" => "1",
- "testing" => "vagrant",
- "location" => "vagrant"
- }
+ puppet.manifest_file = "#{manifest_file}"
+ puppet.manifests_path = "#{manifests_path}"
+ puppet.options = "#{puppet_options}"
+ puppet.facter = puppet_default_facts
end
end
@@ -191,19 +177,13 @@
vb.cpus = 2
end
config.vm.provision "puppet" do |puppet|
- puppet.environment_path = "/tmp/puppet/environments"
+ puppet.environment_path = "#{environment_path}"
puppet.environment = "#{environment}"
puppet.hiera_config_path = "#{puppet.environment_path}/#{puppet.environment}/hiera-vagrant.yaml"
- puppet.manifest_file = "site.pp"
- puppet.manifests_path = "swh-site/manifests"
- puppet.options = "--verbose"
- # puppet.options = "--verbose --debug"
- # puppet.options = "--verbose --debug --trace"
- puppet.facter = {
- "vagrant_testing" => "1",
- "testing" => "vagrant",
- "location" => "vagrant"
- }
+ puppet.manifest_file = "#{manifest_file}"
+ puppet.manifests_path = "#{manifests_path}"
+ puppet.options = "#{puppet_options}"
+ puppet.facter = puppet_default_facts
end
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 6:08 PM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224682
Attached To
D4113: Vagrantfile: Declare variables once then reuse to be more dry
Event Timeline
Log In to Comment