---

- name: copy clean bazel script
  copy:
    src: remove_tmp_bazel_cache.py
    dest: /usr/local/bin/remove_tmp_bazel_cache.py
    mode: 0755
    owner: bamboo
    group: bamboo

- name: set up cron job to run clean bazel script
  cron:
    name: clean_bazel
    cron_file: remove_tmp_bazel_cache
    user: bamboo
    job: /usr/local/bin/remove_tmp_bazel_cache.py | /usr/bin/logger -t remove_tmp_bazel_cache
    minute: "0"
    hour: "*"

