-1

I have configured 3 centos servers for chefworkstation, chefserver and chefclient. Now I want to install nginx using the cookbook. For that I have below script.

package 'nginx' do
  action :install
end

This did not work because there were not enabled epel-release. Is there a way to enable epel repository before running above script?

0

Of course you can, but other people have done it before you so you can use their code.

From a simple google search I found the following official cookbook in Chef Supermarket: https://supermarket.chef.io/cookbooks/yum-epel#readme

|improve this answer|||||
0

Definitely using the yum-epel official cookbook is a better solution, but for anyone who is looking for a fast fix, just install epel-release package:

package 'epel-release'
package 'nginx'
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.