Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Commit

Permalink
Load default config directly from project directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
thom8 committed Apr 23, 2017
1 parent 154da72 commit 2f2b3ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 7 additions & 17 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@ config_dir = ENV['BEET_CONFIG_DIR'] || "#{beet_root}/.beetbox"
project_config = "#{config_dir}/config.yml"
local_config = "#{config_dir}/local.config.yml"
composer_json = "#{beet_root}/composer.json"
vendor_dir = %x(composer config vendor-dir).strip
default_config = "#{vendor_dir}/beet/box/provisioning/ansible/config/default.config.yml"
default_config = "provisioning/ansible/config/default.config.yml" if !File.exist?(default_config)

# Default vagrant config.
vconfig = {
'vagrant_box' => 'beet/box',
'vagrant_box_version' => '~> 0.5.0',
'vagrant_ip' => '0.0.0.0',
'vagrant_memory' => 1024,
'vagrant_cpus' => 1,
'beet_project' => 'drupal',
'beet_profile' => 'beetbox',
'beet_provision_playbook' => 'provision',
'beet_provision_tags' => 'all',
'beet_home' => '/beetbox',
'beet_base' => '/var/beetbox',
'beet_domain' => beet_root.split('/').last.gsub(/[\._]/, '-') + ".local",
'beet_aliases' => [],
'beet_provision' => true,
'drush_create_alias' => true
}
vconfig = YAML::load_file(default_config)
vconfig['beet_home'] = '/beetbox'
vconfig['beet_base'] = '/var/beetbox'
vconfig['beet_domain'] = beet_root.split('/').last.gsub(/[\._]/, '-') + ".local"

# Create config directory.
FileUtils.mkdir_p config_dir
Expand Down
10 changes: 10 additions & 0 deletions provisioning/ansible/config/default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
# Copy any of these settings to the custom config file to override.
#

# Vagrant config.
vagrant_box: beet/box
vagrant_box_version: "~> 0.5.0"
vagrant_ip: "0.0.0.0"
vagrant_memory: "1024"
vagrant_cpus: 1

# Beetbox config.
beet_profile: beetbox
beet_repo: "{{ lookup('env','BEET_REPO') | default('https://github.com/beetboxvm/beetbox.git',true) }}"
beet_version: "{{ lookup('env','BEET_VERSION') | default('master',true) }}"
beet_home: "{{ lookup('env','BEET_HOME') | default('/beetbox',true) }}"
Expand All @@ -30,6 +38,8 @@ beet_mysql_database: "beetbox"
beet_custom_pre_tasks: "{{ beet_base }}/.beetbox/tasks/pre"
beet_custom_post_tasks: "{{ beet_base }}/.beetbox/tasks/post"
beet_root_create: yes
beet_provision_playbook: provision
beet_provision_tags: all
beet_provision: yes

# Symlinks.
Expand Down

0 comments on commit 2f2b3ac

Please sign in to comment.