Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
changed user name to come from private/user.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iigorr committed Oct 22, 2013
1 parent 4960ab8 commit b620781
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vagrant
/private
20 changes: 19 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
require "yaml"

Vagrant::Config.run do |config|
config.vm.box_url = "http://files.vagrantup.com/precise64.box"

yml = YAML.load_file "private/user.yml"

username = 'vagrant'
password = '$6$aqzOtgCM$OxgoMP4JoqMJ1U1F3MZPo2iBefDRnRCXSfgIM36E5cfMNcE7GcNtH1P/tTC2QY3sX3BxxJ7r/9ciScIVTa55l0'

if yml.has_key?('username')
username = yml['username']
end

if yml.has_key?('password')
password = yml['password']
end

config.vm.define "gw" do |gw|
gw.vm.box = "gw"
Expand All @@ -13,7 +27,11 @@ Vagrant::Config.run do |config|
puppet.manifests_path = "puppet/vagrant-manifests"
puppet.manifest_file = "gw.pp"
puppet.module_path = "puppet/modules"
puppet.facter = { "fqdn" => "gw.dev" }
puppet.facter = {
"fqdn" => "box.dev",
'username' => username,
'password' => password
}
end

end
Expand Down

0 comments on commit b620781

Please sign in to comment.