Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Puppet: Switch for Operation Systems (params.pp)
class mysql::params {
case $::osfamily {
'RedHat': {
if $::operatingsystem == 'Fedora' and (is_integer($::operatingsystemrelease) and $::operatingsystemrelease >= 19 or $::operatingsystemrelease == "Rawhide") {
$client_package_name = 'mariadb'
$server_package_name = 'mariadb-server'
} else {
$client_package_name = 'mysql'
$server_package_name = 'mysql-server'
}
$basedir = '/usr'
$config_file = '/etc/my.cnf'
$datadir = '/var/lib/mysql'
$log_error = '/var/log/mysqld.log'
$pidfile = '/var/run/mysqld/mysqld.pid'
$root_group = 'root'
}
'Debian': {
## More parameters defined here
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.