-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b80c168
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#jinja2: newline_sequence:"\r\n" | ||
;SQL Server 2014 Configuration File | ||
[OPTIONS] | ||
IACCEPTSQLSERVERLICENSETERMS="True" | ||
ACTION="Install" | ||
ENU="True" | ||
QUIET="True" | ||
QUIETSIMPLE="False" | ||
UpdateEnabled="False" | ||
ERRORREPORTING="False" | ||
USEMICROSOFTUPDATE="False" | ||
FEATURES=SQLENGINE,FULLTEXT,DQ,RS,SSMS,ADV_SSMS | ||
UpdateSource="MU" | ||
HELP="False" | ||
INDICATEPROGRESS="False" | ||
X86="False" | ||
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" | ||
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" | ||
INSTANCENAME="{{ sql_instance_name }}" | ||
SQMREPORTING="False" | ||
INSTANCEID="{{ sql_instance_name }}" | ||
RSINSTALLMODE="DefaultNativeMode" | ||
INSTANCEDIR="C:\Program Files\Microsoft SQL Server" | ||
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" | ||
AGTSVCPASSWORD="P@ssw0rd" | ||
AGTSVCSTARTUPTYPE="Automatic" | ||
COMMFABRICPORT="0" | ||
COMMFABRICNETWORKLEVEL="0" | ||
COMMFABRICENCRYPTION="0" | ||
MATRIXCMBRICKCOMMPORT="0" | ||
SQLSVCSTARTUPTYPE="Automatic" | ||
FILESTREAMLEVEL="0" | ||
ENABLERANU="False" | ||
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" | ||
SQLSVCACCOUNT="{{ ansible_hostname }}\vagrant" | ||
SQLSVCPASSWORD="vagrant" | ||
SQLSYSADMINACCOUNTS="BUILTIN\Administrators" | ||
ADDCURRENTUSERASSQLADMIN="True" | ||
TCPENABLED="1" | ||
NPENABLED="0" | ||
BROWSERSVCSTARTUPTYPE="Disabled" | ||
RSSVCACCOUNT="" | ||
RSSVCPASSWORD="P@ssw0rd" | ||
RSSVCSTARTUPTYPE="manual" | ||
IACCEPTSQLSERVERLICENSETERMS="True" | ||
FTSVCACCOUNT="NT Service\MSSQLFDLauncher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#jinja2: newline_sequence:"\r\n" | ||
;SQL Server 2014 Configuration File | ||
[OPTIONS] | ||
IACCEPTSQLSERVERLICENSETERMS="True" | ||
ACTION="Install" | ||
ENU="True" | ||
QUIET="True" | ||
QUIETSIMPLE="False" | ||
UpdateEnabled="False" | ||
ERRORREPORTING="False" | ||
USEMICROSOFTUPDATE="False" | ||
FEATURES=SQLENGINE,FULLTEXT,DQ,RS,SSMS,ADV_SSMS | ||
UpdateSource="MU" | ||
HELP="False" | ||
INDICATEPROGRESS="False" | ||
X86="False" | ||
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server" | ||
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" | ||
INSTANCENAME="{{ sql_instance_name }}" | ||
SQMREPORTING="False" | ||
INSTANCEID="{{ sql_instance_name }}" | ||
RSINSTALLMODE="DefaultNativeMode" | ||
INSTANCEDIR="C:\Program Files\Microsoft SQL Server" | ||
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" | ||
AGTSVCPASSWORD="P@ssw0rd" | ||
AGTSVCSTARTUPTYPE="Automatic" | ||
COMMFABRICPORT="0" | ||
COMMFABRICNETWORKLEVEL="0" | ||
COMMFABRICENCRYPTION="0" | ||
MATRIXCMBRICKCOMMPORT="0" | ||
SQLSVCSTARTUPTYPE="Automatic" | ||
FILESTREAMLEVEL="0" | ||
ENABLERANU="False" | ||
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" | ||
SQLSVCACCOUNT="NT Service\MSSQL$SQLEXPRESS" | ||
SQLSVCPASSWORD="P@ssw0rd" | ||
SQLSYSADMINACCOUNTS=“BUILTIN\Administrators" | ||
ADDCURRENTUSERASSQLADMIN="True" | ||
TCPENABLED="1" | ||
NPENABLED="0" | ||
BROWSERSVCSTARTUPTYPE="Disabled" | ||
RSSVCACCOUNT="" | ||
RSSVCPASSWORD="P@ssw0rd" | ||
RSSVCSTARTUPTYPE="manual" | ||
IACCEPTSQLSERVERLICENSETERMS="True" | ||
FTSVCACCOUNT="NT Service\MSSQLFDLauncher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
- hosts: all | ||
gather_facts: True | ||
vars: | ||
sql_instance_name: benz | ||
tasks: | ||
- debug: var=hostvars[inventory_hostname] | ||
- name: create a directory for installer download | ||
win_file: | ||
path: c:\sql | ||
state: directory | ||
|
||
- name: create a directory for installer extraction | ||
win_file: | ||
path: c:\sql\installer | ||
state: directory | ||
|
||
- name: create the configuration file | ||
win_template: | ||
src: files/sql_conf.ini.j2 | ||
dest: c:\sql\sql_conf.ini | ||
|
||
- name: a pre requisite of sql net-framework-35 | ||
win_feature: | ||
name: NET-Framework-Core | ||
state: present | ||
|
||
- name: check downloaded file exists | ||
win_stat: | ||
path: c:\sql\sql_installer.exe | ||
register: installer_file | ||
|
||
- name: get the installer | ||
win_get_url: | ||
url: 'http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe' | ||
dest: 'c:\sql\sql_installer.exe' | ||
when: not installer_file.stat.exists | ||
|
||
- name: extract the installer | ||
win_command: c:\sql\sql_installer.exe /q /x:c:\sql\installer | ||
args: | ||
chdir: c:\sql | ||
creates: c:\sql\installer\setup.exe | ||
|
||
- name: Install the database | ||
win_command: c:\sql\installer\setup.exe /configurationfile=c:\sql\sql_conf.ini | ||
args: | ||
chdir: c:\sql | ||
|