--- - name: Load platform-specific variables include_vars: "{{ lookup('first_found', possible_files) }}" vars: possible_files: files: - '{{ ansible_distribution }}.yml' - '{{ ansible_os_family }}.yml' - default.yml paths: - 'vars' - name: Install Gitlab Runner (Container) import_tasks: Container.yml when: gitlab_runner_container_install - name: Install GitLab Runner (Unix) import_tasks: Unix.yml when: ansible_os_family != 'Windows' and not gitlab_runner_container_install - name: Install GitLab Runner (Windows) import_tasks: Windows.yml when: ansible_os_family == 'Windows' and not gitlab_runner_container_install