Sha256: cffd8ee9ab9ab13ae18e49cd5d153fbf537aa711e674df605334ce57ae8fe64d

Contents?: true

Size: 1.15 KB

Versions: 6

Compression:

Stored size: 1.15 KB

Contents

# Class: mysql::server
#
# manages the installation of the mysql server.  manages the package, service,
# my.cnf
#
# Parameters:
#   [*package_name*] - name of package
#   [*service_name*] - name of service
#   [*config_hash*]  - hash of config parameters that need to be set.
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
class mysql::server (
  $package_name     = $mysql::params::server_package_name,
  $package_ensure   = 'present',
  $service_name     = $mysql::params::service_name,
  $service_provider = $mysql::params::service_provider,
  $config_hash      = {},
  $enabled          = true
) inherits mysql::params {

  Class['mysql::server'] -> Class['mysql::config']

  $config_class = {}
  $config_class['mysql::config'] = $config_hash

  create_resources( 'class', $config_class )

  package { 'mysql-server':
    name   => $package_name,
    ensure => $package_ensure,
  }

  if $enabled {
    $service_ensure = 'running'
  } else {
    $service_ensure = 'stopped'
  }

  service { 'mysqld':
    name     => $service_name,
    ensure   => $service_ensure,
    enable   => $enabled,
    require  => Package['mysql-server'],
    provider => $service_provider,
  }

}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
safeguard-devise-0.0.7 puppet/modules/mysql/manifests/server.pp
safeguard-devise-0.0.6 puppet/modules/mysql/manifests/server.pp
safeguard-devise-0.0.5 puppet/modules/mysql/manifests/server.pp
safeguard-devise-0.0.4 puppet/modules/mysql/manifests/server.pp
safeguard-devise-0.0.3 puppet/modules/mysql/manifests/server.pp
safeguard-devise-0.0.2 puppet/modules/mysql/manifests/server.pp