We worked around the issue by creating a (cringe-worthy) defined type that
checks to see if the package exists first. It was quicker and easier than
some of the alternatives we came up with and worked fine for our needs on
both CentOS 5 and 6.
# XXX: Quietly purge a package while waiting for bug #11450
define purge_pkg ($ensure = '' ){
exec { "purge_rpm_${name}":
command => "/usr/bin/yum -y erase ${name}",
onlyif => "/bin/rpm -q --nosignature --nodigest --quiet ${name}";
}
}
purge_pkg { 'kudzu': ensure => 'purged'; }
Although the ensure parameter doesn't do anything in this case, it was left
in so that any instances of "purge_pkg" can simply be renamed back to
"package" if/when this issue is ever resolved.
-Robert
On Thursday, July 11, 2013 9:57:14 PM UTC-7, Kim Scarborough wrote:
>
> So I have a module that set several packages to "purged". This generates
> messages like this in the log on every run:
>
> puppet-agent[27671]: (/Stage[main]/Foo/Package[ghostscript]/ensure) created
>
> That doesn't bother me in and of itself, but the problem is that those
> messages mark the server as "Changed" in Puppet Dashboard.
>
> What can I do about this?
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.