blob: 7afb3074013a8cc6aa082638cf3647b2e33ff939 [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 "/tmp/change_cassandra_pass.sh" do
10 source "change_cassandra_pass.sh.erb"
11 sensitive true
12 mode 0755
13 variables({
Areli Fusseeec5042018-02-09 00:08:52 +020014 :cassandra_ip => application_host,
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020015 :cassandra_pwd => ENV['CS_PASSWORD']
16 })
17end
18
19
20bash "change-cassandra-pass" do
21 code <<-EOH
22 cd /tmp ; /tmp/change_cassandra_pass.sh
23 EOH
24end