blob: ae582cfe2592556cf27d91c4adb934d0ddbf4666 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
interface = node['interfaces']['application']
application_host = ''
node['network']['interfaces'][interface][:addresses].each do | addr , details |
if details['family'] == ('inet')
application_host = addr
end
end
template "/tmp/change_cassandra_pass.sh" do
source "change_cassandra_pass.sh.erb"
sensitive true
mode 0755
variables({
:cassandra_ip => application_host,
:cassandra_pwd => ENV['CS_PASSWORD'],
:cassandra_port => node['cassandra']['cassandra_port']
})
end
bash "change-cassandra-pass" do
code <<-EOH
cd /tmp ; /tmp/change_cassandra_pass.sh
EOH
end
|