Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

support for socket location in .my.cnf #68

Merged
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
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@
# [*pid_file*]
# Path of pid file. Used by monitor
#
# [*socket*]
# Path to the mysql socket file. If set, will appear in .my.cnf
# Remember to duplicate in the server configuration.
#
# [*data_dir*]
# Path of application data directory. Used by puppi
#
Expand Down Expand Up @@ -261,6 +265,7 @@
$config_file_group = params_lookup( 'config_file_group' ),
$config_file_init = params_lookup( 'config_file_init' ),
$pid_file = params_lookup( 'pid_file' ),
$socket = params_lookup( 'socket' ),
$data_dir = params_lookup( 'data_dir' ),
$log_dir = params_lookup( 'log_dir' ),
$log_file = params_lookup( 'log_file' ),
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
$absent = false
$disable = false
$disableboot = false
$socket = ''

### General module variables that can have a site or per module default
$monitor = false
Expand Down
1 change: 1 addition & 0 deletions templates/root.my.cnf.backup.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

[client]
password=
<% if scope.lookupvar('mysql::socket') != '' %>socket=<%= scope.lookupvar('mysql::socket') %><% end %>
1 change: 1 addition & 0 deletions templates/root.my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

[client]
password=<%= scope.lookupvar('mysql::real_root_password') %>
<% if scope.lookupvar('mysql::socket') != '' %>socket=<%= scope.lookupvar('mysql::socket') %><% end %>