Skip to content

Commit

Permalink
Remove unused properties from server_install resource (#365)
Browse files Browse the repository at this point in the history
Removed the following properties:

- mycnf_file
- extconf_directory
- data_directory
- external_pid_file
- port
- initdb_locale

Updated documentation to reflect the changes.
  • Loading branch information
fernandoaleman committed Apr 16, 2023
1 parent 628f92b commit 4973261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
9 changes: 2 additions & 7 deletions documentation/resource_mariadb_server_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ Name | Types | Description
------------------------------- | ----------------- | ------------------------------------------------------------- | ----------------------------------------- | ---------
`version` | String | Version of MariaDB to install | `10.3` | no
`setup_repo` | Boolean | Define if you want to add the MariaDB repository | `true` | no
`mycnf_file` | String | | `"#{conf_dir}/my.cnf"` (1) | no
`extra_configuration_directory` | String | | `ext_conf_dir` (2) | no
`external_pid_file` | String | | `default_pid_file` (3) | no
`cookbook` | String | The cookbook to look in for the template source | `mariadb` | yes
`password` | String, nil | Pass in a password, or have the cookbook generate one for you | `generate` | no
`install_sleep` | Integer | Number of seconds to sleep in between install commands | `5` | no

(1) `conf_dir` is a helper method which return the main configuration directory based on OS flavor
(2) `ext_conf_dir` is a helper method which return the extra configuration directory based on OS flavor
(3) `default_pid_file` is a helper method which return the pid file name and path based on OS flavor
(1) `default_pid_file` is a helper method which return the pid file name and path based on OS flavor

## Examples

Expand Down
8 changes: 1 addition & 7 deletions resources/server_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@

property :version, String, default: '10.11'
property :setup_repo, [true, false], default: true
property :mycnf_file, String, default: lazy { "#{conf_dir}/my.cnf" }
property :extconf_directory, String, default: lazy { ext_conf_dir }
property :data_directory, String, default: lazy { data_dir }
property :external_pid_file, String, default: lazy { "/var/run/mysql/#{version}-main.pid" }
property :password, [String, nil], default: 'generate'
property :port, Integer, default: 3306
property :initdb_locale, String, default: 'UTF-8'
property :install_sleep, Integer, default: 10, desired_state: false
property :install_sleep, Integer, default: 5, desired_state: false

action :install do
node.run_state['mariadb'] ||= {}
Expand Down

0 comments on commit 4973261

Please sign in to comment.