blob: 0165d36ef1b3ddab012df789118196239289a6f0 [file] [log] [blame]
Areli Fusseeec5042018-02-09 00:08:52 +02001interface = node['interfaces']['application']
2application_host = ''
3node['network']['interfaces'][interface][:addresses].each do | addr , details |
4 if details['family'] == ('inet')
5 application_host = addr
6 end
7end
8
Yuli Shlosberg0875ce02018-01-25 13:53:36 +02009template "/var/lib/ready-probe.sh" do
10 source "ready-probe.sh.erb"
11 sensitive true
12 mode 0755
13 variables({
Areli Fusseeec5042018-02-09 00:08:52 +020014 :cassandra_ip => application_host,
Tal Gitelmanc4d387d2019-03-28 11:00:54 +020015 :cassandra_pwd => ENV['CS_PASSWORD'],
16 :cassandra_port => node['cassandra']['cassandra_port']
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020017 })
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020018end