# SPDX-License-Identifier: MIT
---
- name: Configure cluster properties - empty set
  hosts: all
  vars_files: vars/main.yml
  vars:
    ha_cluster_cluster_name: test-cluster
    ha_cluster_cluster_properties:
      - attrs:
    # test to set true to manage firewall only
    ha_cluster_manage_firewall: true

  tasks:
    - name: Run test
      tags: tests::verify
      block:
        - name: Set up test environment
          include_role:
            name: linux-system-roles.ha_cluster
            tasks_from: test_setup.yml

        - name: Run HA Cluster role
          include_role:
            name: linux-system-roles.ha_cluster
            public: true

        - name: Fetch cluster properties configuration from the cluster
          command:
            cmd: pcs property
          register: __test_pcs_property_config
          changed_when: false

        - name: Debug cluster properties configuration
          debug:
            var: __test_pcs_property_config

        - name: Check firewall and selinux state
          include_tasks: tasks/check_firewall_selinux.yml
