---
- name: install php7-fpm
  pacman: name=php7-fpm,php7-gd,php7-pgsql state=present

- name: install php7-fpm units
  copy: >
    src={{ item }} dest=/etc/systemd/system/{{ item }}
    owner=root group=root mode=0644
  with_items:
    - php-fpm7@.socket
    - php-fpm7@.service
  notify: daemon reload

- name: configure default php.ini
  template: >
    src=php.ini.j2 dest=/etc/php7/php.ini
    owner=root group=root mode=0644
