diff --git a/roles/php_website/tasks/main.yml b/roles/php_website/tasks/main.yml index 6fa535ad41c4b3e7a29d546fb1127f9af7e897e0..8476322354df058771c92d522418896e6cec8074 100644 --- a/roles/php_website/tasks/main.yml +++ b/roles/php_website/tasks/main.yml @@ -34,6 +34,10 @@ createhome: false state: present home: "{{ home }}" + # This is a workaround for a rather stupid bug that Debian seems + # uninterested to backport - + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865762 + shell: /bin/sh - name: Add nginx user to website group user: @@ -59,23 +63,23 @@ state: present with_items: "{{ packages }}" -- name: Set-up MariaDB mysql_config symbolic link for compatibility (workaround for Debian bug 766996) +- name: Set-up MariaDB mysql_config symbolic link for compatibility on Jessie (workaround for Debian bug 766996) file: src: "/usr/bin/mariadb_config" dest: "/usr/bin/mysql_config" state: link - when: "'libmariadb-client-lgpl-dev-compat' in packages" + when: "'libmariadb-client-lgpl-dev-compat' in packages and ansible_distribution_release == 'jessie'" - name: Deploy PHP FPM configuration file for website template: src: "fpm_site.conf.j2" - dest: "/etc/php5/fpm/pool.d/{{ fqdn }}.conf" - validate: "php5-fpm -t -y %s" + dest: "{{ php_fpm_pool_directory }}/{{ fqdn }}.conf" + validate: "{{ php_fpm_binary }} -t -y %s" owner: root group: root mode: 0640 notify: - - Restart php5-fpm + - Restart PHP-FPM - name: Deploy nginx TLS private key for website copy: