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

Commit 436db6f

Browse files
committed
Merge pull request #68 from tobixen/bugfix_client_connection_details
support for socket location in .my.cnf
2 parents 6b458d2 + eb76179 commit 436db6f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@
188188
# [*pid_file*]
189189
# Path of pid file. Used by monitor
190190
#
191+
# [*socket*]
192+
# Path to the mysql socket file. If set, will appear in .my.cnf
193+
# Remember to duplicate in the server configuration.
194+
#
191195
# [*data_dir*]
192196
# Path of application data directory. Used by puppi
193197
#
@@ -261,6 +265,7 @@
261265
$config_file_group = params_lookup( 'config_file_group' ),
262266
$config_file_init = params_lookup( 'config_file_init' ),
263267
$pid_file = params_lookup( 'pid_file' ),
268+
$socket = params_lookup( 'socket' ),
264269
$data_dir = params_lookup( 'data_dir' ),
265270
$log_dir = params_lookup( 'log_dir' ),
266271
$log_file = params_lookup( 'log_file' ),

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
$absent = false
114114
$disable = false
115115
$disableboot = false
116+
$socket = ''
116117

117118
### General module variables that can have a site or per module default
118119
$monitor = false

templates/root.my.cnf.backup.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

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

templates/root.my.cnf.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

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

0 commit comments

Comments
 (0)