File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
lib/puppet/provider/sqlserver_instance Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,10 @@ def basic_cmd_args(features, action)
110
110
def build_cmd_args ( features , action = "install" )
111
111
cmd_args = basic_cmd_args ( features , action )
112
112
if action == 'install'
113
- ( @resource . parameters . keys - %w( ensure loglevel features name provider source sql_sysadmin_accounts sql_security_mode install_switches ) . map ( &:to_sym ) ) . sort . collect do |key |
114
- cmd_args << "/#{ key . to_s . gsub ( /_/ , '' ) . upcase } =\" #{ @resource [ key ] } \" "
113
+ %w( pid sa_pwd sql_svc_account sql_svc_password agt_svc_account agt_svc_password as_svc_account as_svc_password rs_svc_account rs_svc_password security_mode ) . map ( &:to_sym ) . sort . collect do |key |
114
+ if not_nil_and_not_empty? @resource [ key ]
115
+ cmd_args << "/#{ key . to_s . gsub ( /_/ , '' ) . upcase } =\" #{ @resource [ key ] } \" "
116
+ end
115
117
end
116
118
if not_nil_and_not_empty? @resource [ :sql_sysadmin_accounts ]
117
119
if @resource [ :sql_sysadmin_accounts ] . kind_of? ( Array )
@@ -120,6 +122,13 @@ def build_cmd_args(features, action="install")
120
122
cmd_args << "/SQLSYSADMINACCOUNTS=\" #{ @resource [ :sql_sysadmin_accounts ] } \" "
121
123
end
122
124
end
125
+ if not_nil_and_not_empty? @resource [ :as_sysadmin_accounts ]
126
+ if @resource [ :as_sysadmin_accounts ] . kind_of? ( Array )
127
+ cmd_args << "/ASSYSADMINACCOUNTS=#{ Array . new ( @resource [ :as_sysadmin_accounts ] ) . collect { |account | "\" #{ account } \" " } . join ( ' ' ) } "
128
+ else
129
+ cmd_args << "/ASSYSADMINACCOUNTS=\" #{ @resource [ :as_sysadmin_accounts ] } \" "
130
+ end
131
+ end
123
132
end
124
133
cmd_args
125
134
end
You can’t perform that action at this time.
0 commit comments