-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsql.yml
51 lines (48 loc) · 1.68 KB
/
sql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
- hosts: 10.0.3.4
tasks:
- name: Powershell | Install Required Powershell Modules
win_psmodule: name={{ item }} state=present
with_items:
- SQLServerDsc
- StorageDsc
- ServerManager
- dbatools
- xNetworking
- name: Install SQL Server
win_dsc:
resource_name: SQLSetup
Action: Install
UpdateEnabled: True
SourcePath: "{{ mssql_installation_path }}\\SQL"
InstanceName: "{{ mssql_instance_name }}"
InstallSharedDir: "{{ mssql_installshared_path }}"
InstallSharedwowDir: "{{ mssql_installsharedwow_path }}"
InstanceDir: "{{ mssql_instance_path }}"
SQLUserDBDir: "{{ mssql_sqluserdata_path }}"
SQLUserDBLogDir: "{{ mssql_sqluserlog_path }}"
SQLTempDBDir: "{{ mssql_sqltempDB_path }}"
SQLTempDBLogDir: "{{ mssql_sqltempDBlog_path }}"
Features: "{{ mssql_features }}"
SQLCollation: "{{ mssql_collation }}"
# BrowserSvcStartupType: "{{ mssql_browsersvc_mode }}"
# SuppressReboot: "{{ mssql_suppress_reboot }}"
SQLSysAdminAccounts: "{{ mssql_sysadmin_accounts }}"
PsDscRunAsCredential_username: "{{ ansible_user }}"
PsDscRunAsCredential_password: "{{ ansible_password }}"
no_log: true
tags: install_sql
- name: Configure the MSSQLSERVERAGENT Service
win_service:
name: sqlserveragent
state: started
username: "{{ mssql_agentsvc_account }}"
password: "{{ mssql_agentsvc_account_pass }}"
tags: install_sql
- name: Configure the MSSQLSERVER Service
win_service:
name: MSSQLSERVER
state: started
username: "{{ mssql_svc_account }}"
password: "{{ mssql_svc_account_pass }}"
tags: install_sql