---

- name: Install buildifier 4.0.0
  become: yes
  get_url:
    # Version 4.0.0
    url:  "https://s3-us-west-1.amazonaws.com/zoox-third-party/db81208c4e6f0f31dc33efaf9373c29c78b5295198cf16e4778e3e9211b57b0b/buildifier"
    dest: "/usr/local/bin/buildifier-4.0.0"
    checksum: "sha256:db81208c4e6f0f31dc33efaf9373c29c78b5295198cf16e4778e3e9211b57b0b"
    owner: root
    group: root
    mode: '755'
- name: Install buildifier 3.2.1
  become: yes
  get_url:
    # Version 3.2.1
    url:  "https://s3-us-west-1.amazonaws.com/zoox-third-party/ad931704631c2ac6199418cc87a64e08b5a10448e085078d6ce64d18a52f0c72/buildifier"
    dest: "/usr/local/bin/buildifier-3.2.1"
    checksum: "sha256:ad931704631c2ac6199418cc87a64e08b5a10448e085078d6ce64d18a52f0c72"
    owner: root
    group: root
    mode: '755'
- name: Symlink default version of buildifier
  become: yes
  file:
    state: link
    src: "buildifier-4.0.0"
    dest: "/usr/local/bin/buildifier"
    # Need force to replace a file with a symlink
    force: yes
