- name: Purge /home/zoox/.log directories
  file:
    state: "{{ item }}"
    path: "{{ ansible_env.HOME }}/.log"
    owner: zoox
    group: zoox
    mode: '755'
  with_items:
    - absent
    - directory
  become: yes

- name: Create logging subdirectories
  file:
    state: directory
    path: "{{ ansible_env.HOME }}/.log/{{ item }}"
    owner: zoox
    group: zoox
    mode: '755'
  with_items:
    - ros
    - glog
    - python
    - ftrace
    - perf
    - electron
  become: yes
