How package resource action is working for install and upgarde because i am seeing during upgrade action chef is internally call "yum install" instead of " yum upgrade"

How package resource action is working for install and upgarde because i am seeing during upgrade action chef is internally call “yum install” instead of " yum upgrade".

I need help here, is there any way to always call yum upgrade during upgrade action.

eg:

package “apache” do
action :upgrade =====> its calling “yum -d0 -e0 -y install packagename” but my requirement is to call "yum -d0 -e0 -y upgarde packagename"
end

Hi Rajan,

Please use yum_package. There is upgrade option in actions.

https://docs.chef.io/resource_yum.html