Suresh Rajagopal writes:
> version is passed via hiera. params.pp has the logic to decide the
> package name based version. Is it a good practice to have this logic
> in params.pp ?
The philosophy I use in my own modules is that params.pp should provide
the best possible default based on the host
t;
> *Sent:* Monday, August 29, 2016 11:41 AM
> *Subject:* Re: [Puppet Users] mysql package name
>
> If you dig deeper into the forge module, I think you will find that
> defaults are set in manifests/params.pp and set in the main class as
> `$client_package_name = $mysql::params::client
x27;MySQL-shared-compat', /^5.6\./ =>
'MySQL-shared-compat', /^5.7\./ => 'mysql-community-libs-compat',
default => 'mysql-community-libs-compat' }
$server_service_name = $version ? { /^5\.0|\.1\./
gt; 'mysql-community-libs-compat',
> default => 'mysql-community-libs-compat'
> }
> $server_service_name = $version ? {
> /^5\.0|\.1\./ => 'mysql',
> /^5.6\./ => 'mysql',
>
.7\./ => 'mysql-community-libs-compat',
default => 'mysql-community-libs-compat' }
$server_service_name = $version ? { /^5\.0|\.1\./ => 'mysql',
/^5.6\./ => 'mysql', /^5.7\./ =&g
w to handle this logic ?
Thanks
Suresh Rajagopal
*From:* Lowe Schmidt
*To:* puppet-users@googlegroups.com
*Sent:* Monday, August 29, 2016 7:29 AM
*Subject:* Re: [Puppet Users] mysql package name
Have a look at the mysql module
> MySQL-server 5.7
--->mysql-community-server
How to handle this logic ?
ThanksSuresh Rajagopal From: Lowe Schmidt
To: puppet-users@googlegroups.com
Sent: Monday, August 29, 2016 7:29 AM
Subject: Re: [Puppet Users] mysql package name
Have a look at the mysql module in the forg
Have a look at the mysql module in the forge [0]. They solve it by having a
package_ensure parameter to the mysql::server class which is one of [
'present', 'latest, 'absent', 'x.y.z' ] where "x.y.z" is a version string.
[0] https://forge.puppet.com/puppetlabs/mysql#mysqlserver
--
Lowe Schmidt |
Hi,
Puppet 3.4 with hieara.
what is the best place to define package name within a module? package name
varies based on package version.
Thanks
Suresh Rajagopal
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group a