I have an interesting problem (to me). I want to install Percona
mysql. This is easy.
But I also want to make sure regular MySQL isn't installed on the same
machine that's running Percona.

To install Percona, I have a resource like

  package {
    'percona-client':
    name => 'Percona-Server-client-55',
    ensure => installed,
  }

To make sure MySQL isn't installed I have

  package {
    'mysql':
      provider => "yum",
      ensure => purged,
  }

The problem is that Puppet tries to remove Percona, instead of MySQL.
This is because the Percona rpm provides the mysql feature. By this I mean
the output from 'yum provides mysql' contains (edited):

Percona-Server-client-55-5.5.36-rel34.2.el6.x86_64 : Percona Server - Client
Repo        : XXX
Matched from:
Other       : mysql

Percona-Server-client-55-5.5.36-rel34.2.el6.x86_64 : Percona Server - Client
Repo        : installed
Matched from:
Other       : Provides-match: mysql

Of course, trying to remove Percona fails because other things depend on
it, as they should.

The only ideas I have for removing MySQL, and not Percona, are:

1) Use rpmrebuild to change what Percona provides
2) Use something like (untested)

exec { "/usr/bin/yum -y remove mysql":
  onlyif => "/bin/rpm -qa |/bin/fgrep mysql"

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?

Jon Forrest

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAF0Z9io2vvOO3nBitsZRXE0AbbA10f8rP0mnhse61%3DWOG9Ycag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to