- name: Read bazel version
  command: "dpkg-query --showformat='${Version}' --show bazel"
  register: bazel_version
  changed_when: false
  failed_when: false

- name: Test if bazel download required
  set_fact:
    should_download_bazel: "{{ bazel.version not in bazel_version.stdout }}"
