Skip to content

Commit

Permalink
Vagrant: Added Vagrantfile for development (#294)
Browse files Browse the repository at this point in the history
Thanks @lonix
  • Loading branch information
lonix authored and desimaniac committed May 18, 2019
1 parent 1af78d5 commit 614c395
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Cloudbox
### Vagrant ###
.vagrant/
*.box

### MacOS ###
.DS_Store

### Python ###
*.pyc

### Ansible ###
/backup.lock
/cloudbox.retry

### Cloudbox ###
/ansible.cfg
/accounts.yml
/settings.yml
Expand All @@ -7,13 +21,3 @@
/backup_config.yml
/backup_excludes_list.txt
/*.log

# Ansible
/backup.lock
/cloudbox.retry

# MacOS
.DS_Store

# Python
*.pyc
31 changes: 31 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$script = <<-SCRIPT
cd ~/cloudbox
for f in defaults/*.default; do base=${f##*/} base=${base%.default}; cp -n -- "$f" "$base"; done
SCRIPT

Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", disabled: false
config.vm.synced_folder ".", "/home/vagrant/cloudbox", disabled: false
config.vm.provision "shell", path: "https://cloudbox.works/scripts/dep.sh"
config.vm.provision "shell", privileged: false, inline: $script
config.vm.provision "ansible_local", run: "always" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.config_file = "/home/vagrant/cloudbox/ansible.cfg"
ansible.inventory_path = "/home/vagrant/cloudbox/inventories/local"
ansible.limit = "all"
ansible.playbook = "/home/vagrant/cloudbox/cloudbox.yml"
ansible.become = true
# ansible.verbose Examples: false, true (equivalent to v), -vvv (equivalent to vvv), vvvv.
ansible.verbose = false
ansible.tags = "cloudbox"
ansible.skip_tags = "settings"
ansible.extra_vars = { continuous_integration: true }

end
# config.vm.define "ubuntu18" do |ubuntu18|
# ubuntu18.vm.box = "generic/ubuntu1804"
# end
config.vm.define "ubuntu16" do |ubuntu16|
ubuntu16.vm.box = "generic/ubuntu1604"
end
end

0 comments on commit 614c395

Please sign in to comment.