---
- name: Assert fail on EL 7 with version = 2022 and EL 9 with version != 2022
  include_tasks: assert_fail_on_unsupported_ver.yml

- name: Set up MSSQL
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_password: "p@55w0rD"
    mssql_edition: Evaluation

- name: Configure the mssql-server service start limit interval and burst
  include_tasks: tasks/mssql-sever-increase-start-limit.yml

- name: >-
    Change the password with default settings.
    Should report Changed.
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_password: "p@55w0rD11"

- name: Verify settings
  include_tasks: tasks/verify_settings.yml
  vars:
    __verify_mssql_password: "p@55w0rD11"

- name: Change the IP address setting.
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_ip_address: 127.0.0.1

- name: >-
    Change the password with a custom IP address.
    Should report Changed.
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_password: "p@55w0rD"

- name: Verify settings
  include_tasks: tasks/verify_settings.yml
  vars:
    __verify_mssql_password: "p@55w0rD"

- name: Change the TCP port setting.
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_tcp_port: 1432

- name: >-
    Change the password with a custom TCP port and IP address.
    Should report Changed.
  include_role:
    name: linux-system-roles.mssql
  vars:
    mssql_password: "p@55w0rD11"

- name: Verify settings
  include_tasks: tasks/verify_settings.yml
  vars:
    __verify_mssql_password: "p@55w0rD11"

- name: Check the ansible_managed header in the configuration file
  include_tasks: tasks/check_header.yml
