D
D
den199482018-09-06 11:05:06
Chef
den19948, 2018-09-06 11:05:06

How to unpack a Chef file?

I am trying to unpack the file with the command

tar_extract '/tmp/mycode-1.2.3.tar.gz' do
  action :extract_local
  target_dir '/opt/myapp/mycode'
  creates '/opt/myapp/mycode/lib'
end

But it gives me an error
NoMethodError
-------------
undefined method `tar_extract' for cookbook: wordpres_apache, recipe: default :Chef::Recipe

I can't understand anything... why doesn't it define a method?
Maybe you need to add the package to the metadata?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2018-12-14
@den19948

probably depends 'tar', '~> 2.2.0' in metadata.rb (I did
n't check the version, I just took the last one from https://supermarket.chef.io/cookbooks/tar for comment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question