- name: Check version of bazel shell: bazel --version | grep -Eo '([0-9]+\.)+[0-9]+' ignore_errors: yes register: installed_bazel_version - debug: msg="Current installed Bazel version is {{ installed_bazel_version.stdout }}" - name: Download and install Bazel if needed include_tasks: install-bazel.yaml when: - install_bazel_if_missing - installed_bazel_version.stdout != bazel_version