X Tutup
Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 614c395

Browse files
lonixdesimaniac
authored andcommitted
Vagrant: Added Vagrantfile for development (#294)
Thanks @lonix
1 parent 1af78d5 commit 614c395

File tree

2 files changed

+46
-11
lines changed

2 files changed

+46
-11
lines changed

.gitignore

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# Cloudbox
1+
### Vagrant ###
2+
.vagrant/
3+
*.box
4+
5+
### MacOS ###
6+
.DS_Store
7+
8+
### Python ###
9+
*.pyc
10+
11+
### Ansible ###
12+
/backup.lock
13+
/cloudbox.retry
14+
15+
### Cloudbox ###
216
/ansible.cfg
317
/accounts.yml
418
/settings.yml
@@ -7,13 +21,3 @@
721
/backup_config.yml
822
/backup_excludes_list.txt
923
/*.log
10-
11-
# Ansible
12-
/backup.lock
13-
/cloudbox.retry
14-
15-
# MacOS
16-
.DS_Store
17-
18-
# Python
19-
*.pyc

Vagrantfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
$script = <<-SCRIPT
2+
cd ~/cloudbox
3+
for f in defaults/*.default; do base=${f##*/} base=${base%.default}; cp -n -- "$f" "$base"; done
4+
SCRIPT
5+
6+
Vagrant.configure("2") do |config|
7+
config.vm.synced_folder ".", "/vagrant", disabled: false
8+
config.vm.synced_folder ".", "/home/vagrant/cloudbox", disabled: false
9+
config.vm.provision "shell", path: "https://cloudbox.works/scripts/dep.sh"
10+
config.vm.provision "shell", privileged: false, inline: $script
11+
config.vm.provision "ansible_local", run: "always" do |ansible|
12+
ansible.compatibility_mode = "2.0"
13+
ansible.config_file = "/home/vagrant/cloudbox/ansible.cfg"
14+
ansible.inventory_path = "/home/vagrant/cloudbox/inventories/local"
15+
ansible.limit = "all"
16+
ansible.playbook = "/home/vagrant/cloudbox/cloudbox.yml"
17+
ansible.become = true
18+
# ansible.verbose Examples: false, true (equivalent to v), -vvv (equivalent to vvv), vvvv.
19+
ansible.verbose = false
20+
ansible.tags = "cloudbox"
21+
ansible.skip_tags = "settings"
22+
ansible.extra_vars = { continuous_integration: true }
23+
24+
end
25+
# config.vm.define "ubuntu18" do |ubuntu18|
26+
# ubuntu18.vm.box = "generic/ubuntu1804"
27+
# end
28+
config.vm.define "ubuntu16" do |ubuntu16|
29+
ubuntu16.vm.box = "generic/ubuntu1604"
30+
end
31+
end

0 commit comments

Comments
 (0)
X Tutup