---
- name: Run tlog-SSSD configuration tests
  hosts: all

  tasks:
    - name: Run role with default sssd settings
      import_role:
        name: redhat.rhel_system_roles.tlog

    - name: Run sssd tests
      import_tasks: run_sssd_tests.yml

    - name: Run role with tlog_scope_sssd all
      import_role:
        name: redhat.rhel_system_roles.tlog
      vars:
        tlog_scope_sssd: all

    - name: Check sssd files provider setup properly
      import_tasks: check_sssd_files_provider.yml

    - name: Run sssd tests
      import_tasks: run_sssd_tests.yml

    - name: Run role with tlog_scope_sssd some
      import_role:
        name: redhat.rhel_system_roles.tlog
      vars:
        tlog_scope_sssd: some
        tlog_users_sssd:
          - mike
          - john
        tlog_groups_sssd:
          - teachers
          - students

    - name: Run sssd tests
      import_tasks: run_sssd_tests.yml

    - name: Run role with excluded users and groups
      import_role:
        name: redhat.rhel_system_roles.tlog
      vars:
        tlog_scope_sssd: all
        tlog_exclude_users_sssd:
          - jeff
          - james
        tlog_exclude_groups_sssd:
          - admins

    - name: Run sssd tests
      import_tasks: run_sssd_tests.yml
