SQL Server 2019 Installation Failing

Dear All,

I am getting below error while installing SQL server 2019. Also below is the playbook that I am using. So can someone please help.

Praveen,

Can you check the installed SQL Server services?

Thanks,
Rahul

(attachments)

Hello Rahul,

No SQL services were installed due to which I got that error.

Thanks and Regards,
Praveen Singh

(attachments)

Can someone please help me with this?

Thanks and regards,
Praveen Singh

(attachments)

You are ignoring errors on your win_command task that is actually installing SQL so when you go to configure the service it is failing because it isn’t installed. You should only ignore_errors if you truely don’t care if it fails or not, if it is failing then you need to solve that problem first.

As for installing SQL Server it’s a bit tricky because it needs to access the DPAPI store for your current user. By default a WInRM connection will not be able to access this due to how it actually logs in the account. In short you need to either use CredSSP as your WinRM authentication or use become on the task with explicit credentials to bypass this DPAPI limitation https://docs.ansible.com/ansible/latest/user_guide/become.html#become-and-windows.