~charmers/charms/precise/rails/trunk

« back to all changes in this revision

Viewing changes to cookbooks/redis-relation/recipes/changed.rb

  • Committer: Pavel Pachkovskij
  • Date: 2013-08-21 10:46:29 UTC
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: pavel.pachkovskij@gmail.com-20130821104629-zgrf6efx90tkf0ps
add rvm-installer, move cookbooks to CHARM_DIR

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
redis = {
 
2
  host: juju_relation['hostname'],
 
3
  port: juju_relation['port'],
 
4
}
 
5
 
 
6
if %i(host port).any? { |attr| redis[attr].nil? || redis[attr].empty? }
 
7
  puts "Waiting for all attributes being set."
 
8
else
 
9
  rack_envfile "#{node[:rack][:root]}/shared/.env" do
 
10
    variables({
 
11
      redis_url: "redis://#{redis[:host]}:#{redis[:port]}",
 
12
    })
 
13
    user 'deploy'
 
14
    group 'deploy'
 
15
    mode '0644'
 
16
    action :merge
 
17
  end
 
18
 
 
19
  executables do
 
20
    action :export
 
21
  end
 
22
 
 
23
  service 'rack' do
 
24
    ignore_failure true
 
25
    provider Chef::Provider::Service::Upstart
 
26
    action :restart
 
27
  end
 
28
end
 
 
b'\\ No newline at end of file'