# This playbook creates a Zoox directory and clones the driving repo

---
- name: Driving repo
  hosts: deploy
  become_user: "{{ account }}"
  tasks:
  - name: Create zoox directory
    file:
      path: /home/{{ account }}/zoox
      state: directory
      owner: "{{ account }}"
      mode: u+rw

  - name: Clone driving repo
    git:
      accept_hostkey: yes
      force: yes
      repo: git@git.zooxlabs.com:zooxco/driving.git
      dest: /home/{{ account }}/zoox/driving
      key_file: /home/{{ account }}/.ssh/id_rsa

