-
Notifications
You must be signed in to change notification settings - Fork 291
/
default.rb
24 lines (22 loc) · 898 Bytes
/
default.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if ['app_master', 'app'].include?(node[:instance_role])
# If you have only one utility instance uncomment the line below
#redis_instance = node['utility_instances'].first
# Otherwise, if you have multiple utility instances you can specify it by uncommenting the line below
# You can change the name of the instance based on whatever name you have chosen for your instance.
#redis_instance = node['utility_instances'].find { |instance| instance['name'] == 'redis' }
if redis_instance
node[:applications].each do |app, data|
template "/data/#{app}/shared/config/redis.yml"do
source 'redis.yml.erb'
owner node[:owner_name]
group node[:owner_name]
mode 0655
backup 0
variables({
:environment => node[:environment][:framework_env],
:hostname => redis_instance[:hostname]
})
end
end
end
end