# Fixes search @ http://box/modules/es-wikihow (popular with Spanish youth)
# Source code: http://download.iiab.io/packages/php-stem.src.tar
# June 2018 debugging & compilation thanks to Tim Moody & George Hunt
# Original bug: https://github.com/iiab/iiab/issues/829

#- name: Download php-stem.rpi.tar
#  command: cd /; wget http://download.iiab.io/packages/php-stem.rpi.tar
#  when: is_rpi

#- name: Download php-stem.x86.tar
#  command: cd /; wget http://download.iiab.io/packages/php-stem.x64.tar
#  when: not is_rpi

- name: Unarchive http://download.iiab.io/packages/php-stem.rpi.tar to / (rpi)
  unarchive:
    src: http://download.iiab.io/packages/php-stem.rpi.tar
    dest: /
    owner: root
    group: root
    #mode: ????
    remote_src: yes
  when: is_rpi

- name: Unarchive http://download.iiab.io/packages/php-stem.x64.tar to / (debian-9 on x86_64 only)
  unarchive:
    src: http://download.iiab.io/packages/php-stem.x64.tar
    dest: /
    owner: root
    group: root
    #mode: ????
    remote_src: yes
  when: is_debian_9 and (ansible_machine == "x86_64")
# Presumably fails on Debian 8 & 10?
# Fails on Debian i686 as of 2018-08-07: https://github.com/iiab/iiab/issues/983
# Fails on Ubuntu 18.04 as of 2018-07-28: https://github.com/iiab/iiab/issues/829
