I hereby claim:
- I am ihassin on github.
- I am itamar (https://keybase.io/itamar) on keybase.
- I have a public key ASDrmzdPARW675_0HGog-jOPjeSuvIeG39Fl9XVs54PNAAo
To claim this, I am signing this object:
- hosts: webservers | |
user: vagrant | |
sudo: true | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: Install MySQL | |
action: apt pkg=$item state=installed | |
with_items: |
def my_task | |
while(true) do | |
begin | |
database_access_here | |
rescue Exception => ex | |
begin | |
ActiveRecord::Base.connection.reconnect! | |
rescue | |
sleep 10 | |
retry # will retry the reconnect |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define :web do |web_config| | |
web_config.vm.box = "precise64" | |
web_config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
web_config.vm.network :private_network, ip: "33.33.33.33" | |
web_config.vm.network :forwarded_port, guest: 80, host: 8080 |
--- | |
- hosts: webservers | |
user: vagrant | |
sudo: True | |
vars_files: | |
- vars.yml | |
vars: | |
deploy: deploy | |
home_dir: /home/deploy |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
set :stage, :production | |
# Simple Role Syntax | |
# ================== | |
# Supports bulk-adding hosts to roles, the primary | |
# server in each group is considered to be the first | |
# unless any hosts have the primary property set. | |
role :app, %w{deploy@33.33.33.33} | |
role :web, %w{deploy@33.33.33.33} | |
role :db, %w{deploy@33.33.33.33} |
set :application, '<APP_NAME>' | |
set :repo_url, "<git@PATH/REPO.git>" | |
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } | |
set :deploy_to, "/home/deploy/rails/<APP_NAME>" | |
# set :scm, :git | |
set :format, :pretty | |
set :log_level, :debug |
- hosts: webservers | |
user: vagrant | |
sudo: True | |
vars_files: | |
- vars.yml | |
vars: | |
deploy: deploy | |
home_dir: /home/deploy | |
tasks: |
- hosts: webservers | |
user: deploy | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: Make directory for database.yml | |
shell: mkdir -p {{home_dir}}/rails/narui/shared/config | |
- name: Copy database.yml |