On 2014-12-05 08:50, Richard wrote:
>> Hi!
Hi,
[...]
> but when i run command 'rpm -qa| grep mysql' , i find that mysql
> still in my system.
>
>> mysql-connector-java-5.1.17-6.el6.noarch
>> mysql-community-release-el6-5.noarch
>> mysql-community-client-5.6.22-2.el6.x86_64
>> mysql-community-common-5.6.22-2.el6.x86_64
>> mysql-community-libs-5.6.22-2.el6.x86_64
The package resource you manage is "mysql-server". On Redhat based
systems, the package type
uses yum to install packages, which takes care of resolving dependencies
and automatically
installs all packages the mysql-server package requires, like the libs
or common packages.
With ensure => absent, Puppet reomves the "mysql-server" package, which
also happened
in your case, as the mysql-server package is no longer installed. The
packages you see are
libraries and other tools installed as a dependency for mysql-server or
other packages.
[...]
> i want to know how to set yum provider or package attribute to make
> package using yum command to remove mysql not rpm command.
You don't, because it wouldn't make any difference. Yum basically is
nothing more than a
front-end for rpm, which handles remote repositories and dependency
resolving. Under the hood,
yum uses rpm for installing and removing packages.
Hth,
Tom.