Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart optional and minor doc fix #115

Merged
merged 2 commits into from
Sep 17, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# [*ssl_ca] - path to ssl-ca
# [*ssl_cert] - path to ssl-cert
# [*ssl_key] - path to ssl-key
# [*log_error] - path to mysql error log
# [*default_engine] - configure a default table engine
# [*root_group] - use specified group for root-owned files
# [*restart] - whether to restart mysqld (true/false)
#
# Actions:
#
Expand Down Expand Up @@ -46,14 +50,18 @@
$ssl_key = $mysql::params::ssl_key,
$log_error = $mysql::params::log_error,
$default_engine = 'UNSET',
$root_group = $mysql::params::root_group
$root_group = $mysql::params::root_group,
$restart = $mysql::params::restart
) inherits mysql::params {

File {
owner => 'root',
group => $root_group,
mode => '0400',
notify => Exec['mysqld-restart'],
notify => $restart ? {
true => Exec['mysqld-restart'],
false => undef,
},
}

if $ssl and $ssl_ca == undef {
Expand Down Expand Up @@ -90,7 +98,10 @@
logoutput => true,
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
notify => Exec['mysqld-restart'],
notify => $restart ? {
true => Exec['mysqld-restart'],
false => undef,
},
require => File['/etc/mysql/conf.d'],
}

Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$port = 3306
$etc_root_password = false
$ssl = false
$restart = true

case $::operatingsystem {
'Ubuntu': {
Expand Down