---
- name: Install kawax script
  get_url: url=https://github.com/ideascube/kawax-scripts/raw/master/kawax
    dest=/usr/local/bin/kawax
    mode=755

- cron:
    name: "Update catalog and download zim from kiwix"
    minute: "0"
    hour: "3"
    job: "/usr/local/bin/kawax update_catalogs && /usr/local/bin/kawax rsync_kiwix > /dev/null"
---
- name: Install kawax script
  get_url: url=https://github.com/ideascube/kawax-scripts/raw/master/kawax
    dest=/usr/local/bin/kawax
    mode=755

- cron:
    name: "Update catalog and download zim from kiwix"
    minute: "0"
    hour: "3"
    job: "/usr/local/bin/kawax update_catalogs && /usr/local/bin/kawax rsync_kiwix > /dev/null"

- name: Test if a fex file exist, if yes, the device is an Olimex
  stat: path=/boot/bin/lime2.bin
  register: fex_file

- name: Test if a fex file exist, if yes, the device is an Olimex
  stat: path=/boot/script.bin
  register: fex_file2

- include: lime2.yml
  when: fex_file.stat.exists is defined and fex_file.stat.exists 
    or fex_file2.stat.exists is defined and fex_file2.stat.exists

Include lime2.yml if the board is an olimex
Include lime2.yml if the board is an olimex
