-
Notifications
You must be signed in to change notification settings - Fork 21
(MODULES-4257) Modify instance and features for SQL Server 2016 #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
84f75b7
1e33983
9872616
165fa9c
dc14cb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
require 'json' | ||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'sqlserver')) | ||
|
||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'puppet_x/sqlserver/server_helper')) | ||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'puppet_x/sqlserver/features')) | ||
|
||
INSTANCE_RESERVED_SWITCHES = | ||
%w(AGTSVCACCOUNT AGTSVCPASSWORD ASSVCACCOUNT AGTSVCPASSWORD PID | ||
|
@@ -70,19 +71,12 @@ def create | |
warn "Uninstalling all features for instance #{@resource[:name]} because an empty array was passed, please use ensure absent instead." | ||
destroy | ||
else | ||
installNet35(@resource[:windows_feature_source]) | ||
instance_version = PuppetX::Sqlserver::ServerHelper.sql_version_from_install_source(@resource[:source]) | ||
Puppet.debug("Installation source detected as version #{instance_version}") unless instance_version.nil? | ||
|
||
installNet35(@resource[:windows_feature_source]) unless instance_version == SQL_2016 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will trigger when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would mirror the current default action of always installing dotNet3.5. I cannot see any harm in installing dot net if the installation media version cannot be detected. |
||
|
||
add_features(@resource[:features]) | ||
# cmd_args = build_cmd_args(@resource[:features]) | ||
# begin | ||
# config_file = create_temp_for_install_switch | ||
# cmd_args << "/ConfigurationFile=\"#{config_file.path}\"" unless config_file.nil? | ||
# try_execute(cmd_args) | ||
# ensure | ||
# if config_file | ||
# config_file.close | ||
# config_file.unlink | ||
# end | ||
# end | ||
end | ||
end | ||
|
||
|
@@ -91,8 +85,7 @@ def create_temp_for_install_switch | |
config_file = ["[OPTIONS]"] | ||
@resource[:install_switches].each_pair do |k, v| | ||
if INSTANCE_RESERVED_SWITCHES.include? k | ||
warn("Reserved switch [#{k}] found for `install_switches`, please know the provided value | ||
may be overridden by some command line arguments") | ||
warn("Reserved switch [#{k}] found for `install_switches`, please know the provided value may be overridden by some command line arguments") | ||
end | ||
if v.is_a?(Numeric) || (v.is_a?(String) && v =~ /^(true|false|1|0)$/i) | ||
config_file << "#{k}=#{v}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger when
instance_version
is nil