diff --git a/Vagrantfile b/Vagrantfile index b50a702..65d900c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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" diff --git a/circle.yml b/circle.yml index 67a756e..d63aae2 100644 --- a/circle.yml +++ b/circle.yml @@ -13,7 +13,7 @@ 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 @@ -21,7 +21,6 @@ dependencies: 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: diff --git a/provisioning/ansible/playbook-config.yml b/provisioning/ansible/playbook-config.yml index e15a171..aa40e27 100644 --- a/provisioning/ansible/playbook-config.yml +++ b/provisioning/ansible/playbook-config.yml @@ -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 }}" diff --git a/provisioning/ansible/playbook-provision.yml b/provisioning/ansible/playbook-provision.yml index 48105d8..b89701f 100644 --- a/provisioning/ansible/playbook-provision.yml +++ b/provisioning/ansible/playbook-provision.yml @@ -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: diff --git a/provisioning/ansible/playbook-roles.yml b/provisioning/ansible/playbook-roles.yml index c3e8613..a2d9302 100644 --- a/provisioning/ansible/playbook-roles.yml +++ b/provisioning/ansible/playbook-roles.yml @@ -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: diff --git a/provisioning/ansible/playbook-tests.yml b/provisioning/ansible/playbook-tests.yml index f4bc637..113257e 100644 --- a/provisioning/ansible/playbook-tests.yml +++ b/provisioning/ansible/playbook-tests.yml @@ -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: diff --git a/provisioning/ansible/playbook-update.yml b/provisioning/ansible/playbook-update.yml index 9692cf4..88da04a 100644 --- a/provisioning/ansible/playbook-update.yml +++ b/provisioning/ansible/playbook-update.yml @@ -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: