On developing ansible role to install SQL Server, I need to develope playbook to uninstall SQL Server. See below the way to uninstall SQL Server on Windows Server. - name: Stop SQL Server Agent win_service: name: SQLSERVERAGENT state: stopped - name: Stop SQL Server win_service: name: MSSQLSERVER state: stopped - name: Uninstall SQL 2014 (this is not version specific task) win_shell: | chcp 949 ..