diff --git a/README.md b/README.md
index 38d1529..21ca0cb 100644
--- a/README.md
+++ b/README.md
@@ -210,6 +210,16 @@ Attributes
Type of database, can be sqlite, mysql or pgsql |
"mysql" |
+
+ node['owncloud']['config']['dbinstance'] |
+ mySQL database instance name to run by the mysql_service lwrp from the mysql cookbook |
+ "default" |
+
+
+ node['owncloud']['config']['dbversion'] |
+ mySQL version to install by the mysql_service lwrp. Refer to https://github.com/chef-cookbooks/mysql#platform-support |
+ nil |
+
node['owncloud']['config']['dbname'] |
Name of the ownCloud database |
@@ -225,10 +235,15 @@ Attributes
Password to access the ownCloud database |
calculated |
+
+ node['owncloud']['config']['dbrootpassword'] |
+ Database admin password to access a database instance |
+ calculated |
+
node['owncloud']['config']['dbhost'] |
Host running the ownCloud database |
- "localhost" |
+ "127.0.0.1" |
node['owncloud']['config']['dbtableprefix'] |
@@ -335,10 +350,7 @@ On the first run, several passwords will be automatically generated and stored i
* `node['owncloud']['admin']['pass']`
* `node['owncloud']['config']['dbpassword']` (Only when using *MySQL* or *PostgreSQL*)
-* `node['mysql']['server_root_password']` (Only when using *MySQL*)
-* `node['mysql']['server_repl_password']` (Only when using *MySQL*)
-* `node['mysql']['server_debian_password']` (Only when using *MySQL*)
-* `node['postgresql']['password']['postgres']` (Only when using *PosgreSQL*)
+* `node['owncloud']['config']['dbrootpassword']` (Only when using *MySQL* or *PostgreSQL*)
When using Chef Solo, these passwords need to be set manually.
diff --git a/metadata.rb b/metadata.rb
index e80047a..3cbc256 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -280,6 +280,20 @@
:required => 'optional',
:default => '"mysql"'
+attribute 'owncloud/config/dbinstance',
+ :display_name => 'mySQL database instance name',
+ :description => 'mySQL database instance name to run by the mysql_service lwrp from the mysql cookbook',
+ :type => 'string',
+ :required => 'optional',
+ :default => '"default"'
+
+attribute 'owncloud/config/dbversion',
+ :display_name => 'mySQL server version',
+ :description => 'mySQL version to install by the mysql_service lwrp. Refer to https://github.com/chef-cookbooks/mysql#platform-support',
+ :type => 'string',
+ :required => 'optional',
+ :default => 'nil'
+
attribute 'owncloud/config/dbname',
:display_name => 'ownCloud Database Name',
:description => 'Name of the ownCloud database',
@@ -301,12 +315,19 @@
:type => 'string',
:required => 'optional'
+attribute 'owncloud/config/dbrootpassword',
+ :display_name => 'Database Root Password',
+ :description => 'Database admin password to access a database instance',
+ :calculated => true,
+ :type => 'string',
+ :required => 'optional'
+
attribute 'owncloud/config/dbhost',
:display_name => 'ownCloud Database Host',
:description => 'Host running the ownCloud database',
:type => 'string',
:required => 'optional',
- :default => '"localhost"'
+ :default => '"127.0.0.1"'
attribute 'owncloud/config/dbtableprefix',
:display_name => 'ownCloud Database Table Prefix',
diff --git a/recipes/default.rb b/recipes/default.rb
index 6fc53f2..6c6c141 100644
--- a/recipes/default.rb
+++ b/recipes/default.rb
@@ -121,7 +121,7 @@
when 'mysql'
if %w{ localhost 127.0.0.1 }.include?(node['owncloud']['config']['dbhost'])
# Install MySQL
- dbinstance = node['owncloud']['config']['dbinstance'] = 'default'
+ dbinstance = node['owncloud']['config']['dbinstance']
mysql2_chef_gem dbinstance do
action :install