~charmers/charms/precise/rails/trunk

« back to all changes in this revision

Viewing changes to hooks/chef/cookbooks/memcached-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
 
memcached = {
2
 
  host: juju_relation['host'],
3
 
  port: juju_relation['port'],
4
 
}
5
 
 
6
 
if %i(host port).any? { |attr| memcached[attr].nil? || memcached[attr].empty? }
7
 
  puts "Waiting for all attributes being set."
8
 
else
9
 
  rack_envfile "#{node[:rack][:root]}/shared/.env" do
10
 
    variables({
11
 
      memcache_servers: "#{memcached[:host]}:#{memcached[:port]}",
12
 
      memcache_password: nil,
13
 
      memcache_username: nil
14
 
    })
15
 
    user 'deploy'
16
 
    group 'deploy'
17
 
    mode '0644'
18
 
    action :merge
19
 
  end
20
 
 
21
 
  executables do
22
 
    action :export
23
 
  end
24
 
 
25
 
  service 'rack' do
26
 
    ignore_failure true
27
 
    provider Chef::Provider::Service::Upstart
28
 
    action :restart
29
 
  end
30
 
end
 
 
b'\\ No newline at end of file'