You must use the exact package name. The chef package resource is not magic to find matching packages.
The resource name (the part immediately after the package) is used as the package name and is assigned to the base system (yum on RH-like systems suitable for such systems)
If you have several packages to install and a general configuration, you can iterate over them in your recipe:
['mysql-server','mysql-common','mysql-client'].each do |p| package p do action :install end end
Creating an array can be simplified with some ruby ββsyntax like the words builder %w :
%w(mysql-server mysql-common mysql-client).each [...]
Since chef 12.1, the package resource accepts an array of packages as follows:
package %w(mysql-server mysql-common mysql-client)
source share