# Deploy a new version of the code to the ingest servers.
#  Currently deploys the scripts that run as cron jobs, AND the crontab setup.
#  To run use:
#  `ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook -i inventory/ingest_servers --ask-pass --ask-sudo-pass ingest_deploy.yaml --extra-vars "host_group=ingest_YOUR_KIOSK_GROUP" --extra-vars "BRANCH=master_OR_YOUR_BRANCH`
#  See `inventory/ingest_servers` for the current list of ingest servers and host_groups. You can also add a new host_group with a list of target server for dev testing.

---
- hosts: '{{ host_group }}'
  user: zoox

  vars:
    driving_root: "{{REPO_DIR}}"

  vars_files:
    - vars/ingest_vars.yaml

  roles:
    - ingest-bootstrap
    # 20170314 -- found out that INFRA-1120 split apart the packages role.
    #             Now have to import bits of it.
    - ../../scripts/ansible/roles/apt_sources
    - ../../scripts/ansible/roles/compilers
    - ../../scripts/ansible/roles/libs
    - ../../scripts/ansible/roles/python
    - ../../scripts/ansible/roles/python_pip
    - ../../scripts/ansible/roles/python_pip_conf
    - ../../scripts/ansible/roles/python_deps
    - ../../scripts/ansible/roles/python_dev_deps
    - ../../scripts/ansible/roles/ros
    - ../../scripts/ansible/roles/utilities
    - ../../scripts/ansible/roles/bazel
    - ../../scripts/ansible/roles/calibration
    - ntp
    - ingest-postdev
