---
- name: Add ppa Repository
  sudo: yes
  apt_repository: repo=ppa:ondrej/{{ php.ppa }} update_cache=yes

- name: Install php5
  sudo: yes
  apt: pkg=php5.6 state=latest

- name: Install PHP Packages
  sudo: yes
  apt: pkg={{ item }} state=latest
  with_items: "{{ php.packages }}"
  when: php.packages is defined

- include: configure.yml
- include: pecl.yml
