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

Copy conf files directly from .beetbox dir. #210

Merged
merged 1 commit into from
May 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,6 @@ Vagrant.configure("2") do |config|
debug_mode = "BEET_DEBUG=true"
end

# Upload vagrant.config.yml
node.vm.provision "project_config", type: "file" do |s|
s.source = project_config
s.destination = "~/vagrant.config.yml"
end

# Upload local.config.yml
if File.exist?(local_config)
node.vm.provision "local_config", type: "file" do |s|
s.source = local_config
s.destination = "~/local.config.yml"
end
end

# Provision box
beet_sh = "#{vconfig['beet_home']}/provisioning/beetbox.sh"
remote_sh = "https://raw.githubusercontent.com/beetboxvm/beetbox/master/provisioning/beetbox.sh"
Expand Down
3 changes: 1 addition & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ machine:
UBUNTU_INIT: true
INSTALL_PACKER: true
dependencies:
pre:
override:
- sudo cp -rf ~/$CIRCLE_PROJECT_REPONAME $BEET_HOME
- sudo chmod +x $BEET_HOME/$BEET_PROVISION
- $BEET_HOME/$BEET_PROVISION
- sudo $BEET_HOME/provisioning/packer/scripts/minimize.sh
test:
override:
- sudo cp -rf ~/$CIRCLE_PROJECT_REPONAME/* $BEET_BASE
- sudo cp ~/$CIRCLE_PROJECT_REPONAME/.beetbox/config.yml ~/vagrant.config.yml
- $BEET_HOME/$BEET_PROVISION
deployment:
dev:
Expand Down
10 changes: 5 additions & 5 deletions provisioning/ansible/playbook-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
become: yes

vars:
beet_base: "{{ lookup('env','BEET_BASE') | default('/var/beetbox',true) }}"
beet_user: "{{ lookup('env','BEET_USER') | default('vagrant',true) }}"
ansible_home: "{{ lookup('env','ANSIBLE_HOME') | default('/beetbox/provisioning/ansible',true) }}"
conf_dir: "{{ beet_base }}/.beetbox"
conf_files:
- beetbox.config.yml
- project.config.yml
- vagrant.config.yml
- config.yml
- local.config.yml

tasks:

- name: Check if config files exists
stat: "path=/home/{{ beet_user }}/{{ item }}"
stat: "path={{ conf_dir }}/{{ item }}"
with_items: "{{ conf_files }}"
register: available_conf

- name: Copy config files from home directory.
copy:
src: "/home/{{ beet_user }}/{{ item.item }}"
src: "{{ conf_dir }}/{{ item.item }}"
dest: "{{ ansible_home }}/config/{{ item.item }}"
owner: "{{ beet_user }}"
group: "{{ beet_user }}"
force: yes
when: "{{ item.stat.exists }}"
with_items: "{{ available_conf.results }}"
Expand Down
2 changes: 1 addition & 1 deletion provisioning/ansible/playbook-provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars_files:
- config/beetbox.config.yml
- config/project.config.yml
- config/vagrant.config.yml
- config/config.yml
- config/local.config.yml

pre_tasks:
Expand Down
2 changes: 1 addition & 1 deletion provisioning/ansible/playbook-roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars_files:
- config/beetbox.config.yml
- config/project.config.yml
- config/vagrant.config.yml
- config/config.yml
- config/local.config.yml

tasks:
Expand Down
2 changes: 1 addition & 1 deletion provisioning/ansible/playbook-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars_files:
- config/beetbox.config.yml
- config/project.config.yml
- config/vagrant.config.yml
- config/config.yml
- config/local.config.yml

roles:
Expand Down
2 changes: 1 addition & 1 deletion provisioning/ansible/playbook-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
vars_files:
- config/beetbox.config.yml
- config/project.config.yml
- config/vagrant.config.yml
- config/config.yml
- config/local.config.yml

vars:
Expand Down