---
- name: Install base packages for php development environment
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - php5-common
    - php5-cli

- name: Set some configuration values in php.ini
  lineinfile:
    dest: /etc/php5/cli/php.ini
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    state: present
  with_items:
    - regexp: ';?date.timezone =.*$'
      line: 'date.timezone = Europe/Rome'
    - regexp: ';?display_errors =.*$'
      line: 'display_errors = On'
    - regexp: ';?error_reporting =.*$'
      line: 'error_reporting = E_ALL'

- name: Install composer
  command: curl https://getcomposer.org/composer.phar -o /usr/local/bin/composer creates=/usr/local/bin/composer

- name: Set composer permissions
  file: path=/usr/local/bin/composer state=file mode=0755

---
- name: Install base packages for php development environment
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - php5-common
    - php5-cli
    - php5-intl

- name: Set some configuration values in php.ini
  lineinfile:
    dest: /etc/php5/cli/php.ini
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
    state: present
  with_items:
    - regexp: ';?date.timezone =.*$'
      line: 'date.timezone = Europe/Rome'
    - regexp: ';?display_errors =.*$'
      line: 'display_errors = On'
    - regexp: ';?error_reporting =.*$'
      line: 'error_reporting = E_ALL'

- name: Install composer
  command: curl https://getcomposer.org/composer.phar -o /usr/local/bin/composer creates=/usr/local/bin/composer

- name: Set composer permissions
  file: path=/usr/local/bin/composer state=file mode=0755

Add php5-intl module to PHP dev environment
Add php5-intl module to PHP dev environment
