Skip to content

Commit

Permalink
updates for Vagrant 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
focusaurus committed Aug 16, 2014
1 parent 62aae55 commit 690bee4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions Vagrantfile
@@ -1,16 +1,6 @@
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

def box_setup(config, ip, playbook, inventory)
config.vm.network :private_network, ip: ip
config.vm.provision "ansible" do |ansible|
ansible.playbook = playbook
ansible.inventory_path = inventory
ansible.host_key_checking = false
# ansible.verbose = "vvv"
end
end

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# common settings shared by all vagrant boxes for this project
config.vm.box = "ubuntu/trusty32"
Expand All @@ -22,8 +12,17 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
# stage box intended for configuration closely matching production
config.vm.define "stage" do |stage|
box_setup stage, \
"10.9.8.31", "deploy/playbook_nginx.yml", "deploy/hosts/vagrant_stage.yml"
config.vm.network :private_network, ip: "10.9.8.31"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "deploy/playbook_nginx.yml"
ansible.limit = "stage"
ansible.extra_vars = {
ansible_ssh_user: 'vagrant',
hostname: 'stage.peterlyons.com'
}
ansible.host_key_checking = false
# ansible.verbose = "vvv"
end
stage.vm.synced_folder "./", "/vagrant", disabled: true
end
end
2 changes: 1 addition & 1 deletion deploy/hosts/vagrant_stage.yml
@@ -1 +1 @@
stage.peterlyons.com hostname=stage.peterlyons.com ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
stage.peterlyons.com hostname=stage.peterlyons.com

0 comments on commit 690bee4

Please sign in to comment.