- name: Install SQL Server with Product ID
win_dsc:
resource_name: SqlSetup
InstanceName: "{{ item.instance_name }}"
Features: SQLENGINE
SQLCollation: "{{ item.instance_collation }}"
SQLSvcAccount_username: "{{ item.svcaccount }}"
SQLSvcAccount_password: "{{ item.svcpassword }}"
SQLSysAdminAccounts: "{{ item.svcaccount }}"
InstanceDir: "{{ item.instance_dir }}"
InstallSQLDataDir: "{{ item.installdb_path }}"
SQLUserDBDir: "{{ item.userldb_path }}"
SQLUserDBLogDir: "{{ item.userdblog_path }}"
SQLTempDBDir: "{{ item.tempdb_path }}"
SQLTempDBLogDir: "{{ item.tempdblog_path }}"
SQLBackupDir: "{{ item.backup_path }}"
SourcePath: "{{ disk_image_out.results[0].mount_path }}"
UpdateEnabled: False
ForceReboot: False
ProductKey: "{{ item.productkey }}"
SECURITYMODE: SQL
SAPwd: 'Password'
#SAPwd_Username: sa
#SAPwd_Password: Password
with_items:
- "{{ rl_mssql_instances }}"