chef recipe unable install nginx on RHEL 7.3 chef recipe unable install nginx on RHEL 7.3 nginx nginx

chef recipe unable install nginx on RHEL 7.3


This means there is no package named nginx in your repositories. If you log into the machine you want to provision (With kitchen login, for example), you can try to search package nginx.

The best way to install it if it is not in your repositories is either adding nginx´s official repo with a chef repository resource (Like yum_repository for Centos) or downloading the tarball with Chef resource remote_file.

If you choose the last option, be sure to generate a sha256 of the tarball you download and add it to the remote_file resource, so among other things you prevent Chef from downloading every run the file.

-Edit-

As Szymon says, you can also use the Nginx cookbook for this and don't write any special recipe.


As discussed here, you can use official NGINX chef cookbook or just install epel-release before installing NGINX:

if platform_family?('rhel')  package 'epel-release'endif platform_family?('debian')  apt_update 'update'endpackage 'nginx'