blob: 8ebdeef7dd9b38e8ca9de9d402a74e9aefa1aef7 [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({
k.kedron004fb642019-07-09 13:02:08 +020014 :cassandra_ip => application_host,
15 :cassandra_pwd => ENV['CS_PASSWORD'],
16 :cassandra_port => node['cassandra']['cassandra_port']
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020017 })
18end
19
20
21bash "change-cassandra-pass" do
22 code <<-EOH
23 cd /tmp ; /tmp/change_cassandra_pass.sh
24 EOH
25end