- block:

  - name: Install packages
    apt:
      update_cache: yes
      cache_valid_time: 3600
      force_apt_get: yes
      name: [
        nfs-kernel-server,
        iputils-arping,
        avahi-daemon,
        bridge-utils,
        debootstrap,
        nfs-common,
        ipmitool,
        grub-efi,
        dnsmasq,
        nginx,
        unzip,
        curl,
        pigz,
        git,
        # the below are for development only
        vim,
        nmap,
        tftp,
        tmux,
        ifstat,
        screen,
        net-tools,
        dosfstools,  # mkfs.fat
      ]

  - name: Install zaccess
    shell: sh -c "$(curl pki.zooxlabs.com/trusty/install)"
    args:
      creates: /usr/bin/zaccess

  become: yes

# note: ansible unarchive mangles the .tar.gz extension and then can't recognize the file
- name: Install SUM tool from s3
  get_url:
    url: https://s3-us-west-1.amazonaws.com/zoox-third-party/c4ddee39d7dda8035dfa0aac8486b671eed972070d6d3f38ba07ba4eee9ee580/sum
    dest: "{{ imaging_bin }}"
    checksum: "sha256:c4ddee39d7dda8035dfa0aac8486b671eed972070d6d3f38ba07ba4eee9ee580"
    owner: zoox
    group: zoox
    mode: '755'
