Skip to content

Commit

Permalink
allow to set the folder to store the db
Browse files Browse the repository at this point in the history
  • Loading branch information
Koaxiel committed May 6, 2021
1 parent 9534ab3 commit 4e4e25f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
default['mariadb']['max_connections'] = 302
default['mariadb']['max_connect_errors'] = 1000
default['mariadb']['wait_timeout'] = 600
default['mariadb']['datadir'] = '/var/lib/mysql'

default['librenms']['root_dir'] = '/var/opt'
default['librenms']['path'] = ::File.join(node['librenms']['root_dir'], 'librenms')
Expand Down
2 changes: 2 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
max_connections: node['mariadb']['max_connections'],
max_connect_errors: node['mariadb']['max_connect_errors'],
wait_timeout: node['mariadb']['wait_timeout'],
datadir: node['mariadb']['datadir'],
)
notifies :restart, 'service[mysql]'
end
Expand Down Expand Up @@ -123,6 +124,7 @@
max_connections: node['mariadb']['max_connections'],
max_connect_errors: node['mariadb']['max_connect_errors'],
wait_timeout: node['mariadb']['wait_timeout'],
datadir: node['mariadb']['datadir'],
)
notifies :restart, 'service[mariadb]'
end
Expand Down
1 change: 1 addition & 0 deletions templates/default/librenms-mysqld.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ innodb_flush_log_at_trx_commit = 0
max_connections=<%= @max_connections %>
max_connect_errors=<%= @max_connect_errors %>
wait_timeout=<%= @wait_timeout %>
datadir=<%= @datadir %>

0 comments on commit 4e4e25f

Please sign in to comment.