---
- name: "check ioncube_module"
  stat:
    path: "{{ OS.ioncube.dirs.data }}/{{ OS.ioncube.files.so }}"
  register: ioncube_module

- include_tasks: create_dir.yml
  when:
    - not ioncube_module.stat.exists
    - billing.packages.php_fpm == 1

- include_tasks: copy.yml
  when:
    - not ioncube_module.stat.exists
    - billing.packages.php_fpm == 1

- include_tasks: setup.yml
  when:
    - not ioncube_module.stat.exists
    - billing.packages.php_fpm == 1

- include_tasks: symlink.yml
  when:
    - not ioncube_module.stat.exists
    - billing.packages.php_fpm == 1
