---
- name: Create bashrc.d directory
  file:
    path: /home/zoox/.bashrc.d
    state: directory
    owner: zoox
    group: zoox
    mode: '755'

- name: Install bashrc.d files
  template:
    src: "{{ item }}"
    dest: "/home/zoox/.bashrc.d/{{ item }}"
    owner: zoox
    group: zoox
    mode: '755'
  with_items:
    - zoox_workspace_root.bash

- name: Install bashrc
  template:
    src: "bashrc"
    dest: /home/zoox/.bashrc
    owner: zoox
    group: zoox
    mode: '755'

- name: Install bazelrc
  copy:
    src: "bazelrc"
    dest: /home/zoox/.bazelrc
    owner: zoox
    group: zoox
    mode: '755'

- name: Install gitconfig
  copy:
    src: "gitconfig"
    dest: /home/zoox/.gitconfig
    owner: zoox
    group: zoox
    mode: '755'

- name: Create clusterssh config directory
  file:
    state: directory
    name: /home/zoox/.clusterssh
    owner: zoox
    group: zoox
    mode: '755'

- name: Install clusterssh config
  copy:
    src: "clusterssh"
    dest: /home/zoox/.clusterssh/config
    owner: zoox
    group: zoox
    mode: '755'

- name: Install gdb config
  copy:
    src: "gdbinit"
    dest: /home/zoox/.gdbinit
    owner: zoox
    group: zoox
    mode: '755'

# Kiosks do not have driving repo, so a base vimrc would be helpful
- name: Install vimrc
  copy:
    src: "vimrc"
    dest: /home/zoox/.vimrc
    owner: zoox
    group: zoox
    mode: '755'
  when: zoox_compute_version|default('') == "IK.1"
