---
- hosts: php-fpm-openbsd*
  gather_facts: false
  roles: [openbsd-bootstrap]

- hosts: php-fpm-xenial
  gather_facts: false
  roles: [debian-bootstrap]

- hosts: all
  roles:
    - role: nginx
    - role: php-fpm
  post_tasks:
      - name: Install cURL
        package:
            name: curl
            state: present

      - name: Create html directory
        file:
            path: /var/www/html
            owner: root
            group: 0
            mode: 0o0755
            state: directory

      - name: Add phpinfo script
        copy:
            content: |
                <?php
                phpinfo()
                ?>
            dest: /var/www/html/phpinfo.php
            owner: root
            group: 0
            mode: 0o0644
