Skip to content

Commit

Permalink
Set box hostname to actual Customer directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
bascht committed Feb 20, 2017
1 parent 480a456 commit f99715f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# -*- mode: ruby -*-
VM_NAME=File.basename(File.dirname(__FILE__))

Vagrant.configure(2) do |config|
config.vm.box = "bascht/vm"
config.vm.box_version = ">= 0.5.0"

config.vm.box_version = ">= 0.7.1"
config.vm.hostname = "DevVm"
config.ssh.username = "bascht"
config.ssh.password = "bascht"
config.ssh.insert_key = true
Expand All @@ -14,14 +16,15 @@ Vagrant.configure(2) do |config|
libvirt.cpu_mode = "host-model"
libvirt.nested = true
libvirt.storage :file,
:path => "#{File.basename(File.dirname(__FILE__))}Home",
:path => "#{VM_NAME}Home",
:device => "vdh",
:size => "15G",
:allow_existing => true
end

config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/playbook.yml"
ansible.extra_vars = { vm_hostname: VM_NAME }
end

config.vm.synced_folder '~/Documents', '/home/bascht/Documents', type: 'sshfs'
Expand Down
1 change: 1 addition & 0 deletions ansible/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ apt_ppas:
- ppa:webupd8team/atom
- ppa:adrozdoff/emacs
vm_user: 'bascht'
vm_hostname: "BaseVm"
docker_compose_version: '1.11.1'
docker_machine_version: '0.9.0'
2 changes: 2 additions & 0 deletions ansible/tasks/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@
command: homesick link public --force
become: yes
become_user: "{{ vm_user }}"
- hostname:
name: "{{ vm_hostname }}"

0 comments on commit f99715f

Please sign in to comment.