tealc
tealc

Reputation: 57

Get opsworks tmpdir

I would like to use the tmpdir used by opsworks when running setup. I'm calling it in a hook (before_restart.rb), but it doesn't works. Here is what I'm doing :

app_path = release_path
app_source = "#{node['tmpdir']}"

bash 'get_missing_files' do
  cwd ::File.dirname(app_path)
  code <<-EOH
    echo #{app_source}
  EOH
end

But the result of my app_source variable is nothing... What I expected was something like "/tmp/opsworks20140120-917-pv1iee". What am I doing wrong?

Upvotes: 2

Views: 181

Answers (1)

sethvargo
sethvargo

Reputation: 26997

You'll want to use this:

Chef::Config[:file_cache_path]

Upvotes: 1

Related Questions