I have a package resource that I want to remove, including all of its dependencies. On Red Hat systems, this is done by "yum -y erase <package>".
The corresponding puppet code is:
However, puppet prints this into the logs:
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q abrt --nosignature --nodigest --qf %
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -y erase abrt'
notice: /Stage[main]/Global/Package[abrt]/ensure: created
The notice is clearly incorrect, as there's nothing that's been created. In fact, it repeatedly prints this notice and runs the "yum erase" command long after the package has actually been removed.
Both of these behaviors are incorrect, and are caused by the RAL returning `absent` as the package state, while `purged` is required for the resource to settle.
My expectation is:
1. Logged notices for purged resources should not describe anything as being "created".
2. Puppet should only run the "yum erase" command only if the package query ("rpm -q") returns a valid result.