diff --git a/Vagrantfile b/Vagrantfile index ebe5693..c503f6a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,13 +16,9 @@ SSH_FORWARD = settings['SSH_FORWARD'] || false # Default to shell environment variable: PLAYBOOK (priority #1) PLAYBOOK=ENV["PLAYBOOK"] -if !PLAYBOOK +if !PLAYBOOK || PLAYBOOK.empty? # PLAYBOOK setting in .vagrant.yml (priority #2) PLAYBOOK = settings['PLAYBOOK'] || false - if !PLAYBOOK || PLAYBOOK.empty? - puts "[VAGRANTFILE ERROR]: Set PLAYBOOK setting in .vagrant.yml" - abort - end end Vagrant.configure("2") do |config| @@ -46,6 +42,6 @@ Vagrant.configure("2") do |config| config.vm.provision "ansible" do |ansible| ENV['ANSIBLE_ROLES_PATH'] = File.dirname(__FILE__) + "/roles" ansible.compatibility_mode = "2.0" - ansible.playbook = "dev/" + PLAYBOOK + ".yml" + ansible.playbook = "dev/" + PLAYBOOK || 'default' + ".yml" end end diff --git a/dev/default.yml b/dev/default.yml new file mode 100644 index 0000000..dab1e5c --- /dev/null +++ b/dev/default.yml @@ -0,0 +1,5 @@ +- name: Install 'default' aka nothing + hosts: all + become: true + roles: + - base