-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?

Janith
  • 223
  • 2
  • 4
  • 8
  • https://serverfault.com/questions/946639/how-to-copy-file-from-master-to-minions-on-salt-stack#comment1230007_946639 – user9517 Jan 01 '19 at 12:12

2 Answers2

1

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

Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
1

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'