# SPDX-License-Identifier: MIT
---
- name: Ensure that the role is idempotent when changing the sa user password
  hosts: all
  vars:
    mssql_accept_microsoft_odbc_driver_17_for_sql_server_eula: true
    mssql_accept_microsoft_cli_utilities_for_sql_server_eula: true
    mssql_accept_microsoft_sql_server_standard_eula: true
    mssql_version: 2019
    __mssql_gather_facts_no_log: true
  tasks:
    - name: Run test in a block to clean up in always
      block:
        - name: Run tests_password with SQL Server {{ mssql_version }}
          include_tasks: tasks/tests_password.yml
      always:
        - name: Clean up after the role invocation
          include_tasks: tasks/cleanup.yml
