---

- name: Install generate_protobuf_descriptors for proto_extension_validator
  become: yes
  get_url:
    # This was built using `ci/file_validators/proto_extension/deploy.sh`.
    url:  "http://ci_file_validators.web.zooxlabs.com/93bad60472783f2f1ffb3ac70b29303dc0d46d14388f210ba3917521cb5fec78/generate_protobuf_descriptors"
    dest: "/usr/local/bin/generate_protobuf_descriptors"
    checksum: "sha256:93bad60472783f2f1ffb3ac70b29303dc0d46d14388f210ba3917521cb5fec78"

# Set the permissions of the executable after it's downloaded. This used to be a
# bug in Ansible but it doesn't appear to be fixed in the version that we're
# using. https://github.com/ansible/ansible/issues/11821
- name: Fix generate_protobuf_descriptors permissions
  become: yes
  file:
    path: "/usr/local/bin/generate_protobuf_descriptors"
    owner: root
    group: root
    mode: '755'

- name: Install jsonnet command for jsonnet_validator
  become: yes
  get_url:
    # This was built using `build/jsonnet/deploy.sh`.
    url:  "http://ci_file_validators.web.zooxlabs.com/0e1e714c4948abbf42974997166445c17417e2f740bb8473afa6dbc9468fbce0/jsonnet"
    dest: "/usr/local/bin/jsonnet"
    checksum: "sha256:0e1e714c4948abbf42974997166445c17417e2f740bb8473afa6dbc9468fbce0"
    owner: root
    group: root
    mode: '755'
