On 04/23/2014 10:57 PM, Jon Forrest wrote:
> 3) Just presume that MySQL won't be installed in the first place.
I could do this but I'd like my modules to be more accepting and
not require a specially prepared system.

Any suggestions?

You're trying to circuvment the package management problem. I would suggest you to write custom fact that would check if mysql is installed, and only then apply ensure => absent for package 'mysql'.

Something along these lines:

Facter.add("mysql_installed") do
  setcode do
    rpm_mysql = Facter::Util::Resolution.exec('/bin/rpm -qa mysql')
    if $rpm_mysql != ''
      false
    else
      true
    end
  end
end


if ( $::mysql_installed ) {
  package { 'mysql': ensure => purged }
}

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53582CAF.70600%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to