Areli Fuss | eeec504 | 2018-02-09 00:08:52 +0200 | [diff] [blame] | 1 | interface = node['interfaces']['application'] |
| 2 | application_host = '' |
| 3 | node['network']['interfaces'][interface][:addresses].each do | addr , details | |
| 4 | if details['family'] == ('inet') |
| 5 | application_host = addr |
| 6 | end |
| 7 | end |
| 8 | |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 9 | template "/var/lib/ready-probe.sh" do |
| 10 | source "ready-probe.sh.erb" |
| 11 | sensitive true |
| 12 | mode 0755 |
| 13 | variables({ |
Areli Fuss | eeec504 | 2018-02-09 00:08:52 +0200 | [diff] [blame] | 14 | :cassandra_ip => application_host, |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 15 | :cassandra_pwd => ENV['CS_PASSWORD'] |
| 16 | }) |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 17 | end |