Browse Source

Ansible code and Vagrantfile were cleaned and arranged

master
Blagovest Petrov 9 years ago
parent
commit
3e6d554fee
  1. 61
      Vagrantfile
  2. 6
      errbit.yml
  3. 4
      refinery.yml
  4. 6
      roles/deploy.errbit/defaults/main.yml
  5. 8
      roles/deploy.errbit/tasks/main.yml
  6. 4
      roles/deploy.refinery/defaults/main.yml
  7. 3
      roles/deploy.refinery/tasks/main.yml

61
Vagrantfile

@ -1,37 +1,34 @@
Vagrant.configure(2) do |config|
config.ssh.insert_key = true
ENV['LC_ALL']="en_US.UTF-8"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.define "errbit" do |errbit|
errbit.vm.box = "ubuntu/trusty64"
errbit.vm.hostname = "errbit.homenet.petrovs.info"
errbit.vm.network "private_network", ip: "10.22.128.10"
errbit.vm.network "forwarded_port", guest: 80, host: 8087
errbit.vm.provision "puppet" do |puppet|
puppet.options = "--verbose --debug"
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "errbit.pp"
end
end
config.vm.define "refinery" do |refinery|
refinery.vm.box = "ubuntu/trusty64"
refinery.vm.hostname = "refinery.homenet.petrovs.info"
refinery.vm.network "private_network", ip: "10.22.128.15"
refinery.vm.network "forwarded_port", guest: 80, host: 8086
refinery.vm.provision "puppet" do |puppet|
puppet.options = "--verbose --debug"
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "refinery.pp"
end
end
config.ssh.insert_key = true
ENV['LC_ALL']="en_US.UTF-8"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.define "errbit" do |errbit|
errbit.vm.box = "ubuntu/trusty64"
errbit.vm.hostname = "errbit.homenet.petrovs.info"
errbit.vm.network "private_network", ip: "10.22.128.10"
errbit.vm.network "forwarded_port", guest: 80, host: 8087
errbit.vm.provision "puppet" do |puppet|
puppet.options = "--verbose --debug"
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "errbit.pp"
end
end
config.vm.define "refinery" do |refinery|
refinery.vm.box = "ubuntu/trusty64"
refinery.vm.hostname = "refinery.homenet.petrovs.info"
refinery.vm.network "private_network", ip: "10.22.128.15"
refinery.vm.network "forwarded_port", guest: 80, host: 8086
refinery.vm.provision "puppet" do |puppet|
puppet.options = "--verbose --debug"
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "refinery.pp"
end
end
end

6
errbit.yml

@ -3,7 +3,7 @@
sudo: yes
gather_facts: False
vars:
errbithome: /home/vagrant/errbit
githuburl: 'https://github.com/errbit/errbit.git'
deploy_errbit_homedir: /home/vagrant/errbit
deploy_errbit_githuburl: 'https://github.com/errbit/errbit.git'
roles:
- { role: deploy.errbit, mongo_passwd: '12345'}
- { role: deploy.errbit, deploy_errbit_mongo_passwd: '12345'}

4
refinery.yml

@ -3,7 +3,7 @@
sudo: yes
gather_facts: False
vars:
refineryhome: /home/vagrant/refinery
githuburl: 'https://github.com/refinery/refinerycms.git'
deploy_refinery_homedir: /home/vagrant/refinery
deploy_refinery_githuburl: 'https://github.com/refinery/refinerycms.git'
roles:
- { role: deploy.refinery}

6
roles/deploy.errbit/defaults/main.yml

@ -1,3 +1,3 @@
errbithome: '/home/vagrant/errbit'
githuburl: 'https://github.com/errbit/errbit.git'
mongo_passwd: "12345"
deploy_errbit_homedir: '/home/vagrant/errbit'
deploy_errbit_githuburl: 'https://github.com/errbit/errbit.git'
deploy_errbit_mongo_passwd: "12345"

8
roles/deploy.errbit/tasks/main.yml

@ -7,15 +7,13 @@
- name: Bundle install
command: /usr/local/bin/bundle install
args:
chdir: '{{ errbithome }}'
chdir: '{{ deploy_errbit_homedir }}'
register: bundleout
#- debug: msg= '{{ bundleout.stdout }}'
- name: Bundle exec
command: /usr/local/bin/bundle exec rake errbit:bootstrap
args:
chdir: '{{ errbithome }}'
chdir: '{{ deploy_errbit_homedir }}'
register: dbing
- debug: msg= '{{ dbing.stdout }}'
@ -39,8 +37,6 @@
state=present
notify: start errbit
#- debug: msg= '{{ updatercdbg.stdout }}'
- name: Delete default Nginx config
file: path=/etc/nginx/sites-enabled/default state=absent

4
roles/deploy.refinery/defaults/main.yml

@ -1,2 +1,2 @@
refineryhome: '/home/vagrant/refinery'
githuburl: 'https://github.com/refinery/refinerycms.git'
deploy_refinery_homedir: '/home/vagrant/refinery'
deploy_refinery_githuburl: 'https://github.com/refinery/refinerycms.git'

3
roles/deploy.refinery/tasks/main.yml

@ -1,6 +1,3 @@
#- name: GIT clone refinery repository
# git: repo={{ githuburl }} dest={{ refineryhome }}
- name: Install Bundler
command: /usr/bin/gem2.0 install bundler

Loading…
Cancel
Save