diff options
Diffstat (limited to 'ansible/plays')
-rw-r--r-- | ansible/plays/malabaricus.yml | 24 | ||||
-rw-r--r-- | ansible/plays/templates/nginx/malabaricus/sites-enabled/default | 2 |
2 files changed, 16 insertions, 10 deletions
diff --git a/ansible/plays/malabaricus.yml b/ansible/plays/malabaricus.yml index 26587ad..6a9ff19 100644 --- a/ansible/plays/malabaricus.yml +++ b/ansible/plays/malabaricus.yml @@ -1,5 +1,15 @@ - hosts: - malabaricus + tags: nextcloud + become: yes + vars: + fpm_version: 7.3 + handlers: + - name: systemctl restart fpm + become: yes + systemd: + name: "php{{ fpm_version }}-fpm" + state: restarted roles: - minio-server - role: nginx @@ -8,12 +18,6 @@ - sites-enabled/minio ipv6: "[::]:80" server_name: minio.trygvis.io - -# Nextcloud -- hosts: - - malabaricus - tags: nextcloud - become: yes tasks: - apt: name: @@ -25,7 +29,7 @@ owner: www-data group: www-data - copy: - dest: /etc/php/7.0/fpm/conf.d/99-nextcloud.ini + dest: '/etc/php/{{ fpm_version }}/fpm/conf.d/99-nextcloud.ini' content: | opcache.enable=1 opcache.enable_cli=1 @@ -34,9 +38,10 @@ opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1 + notify: systemctl restart fpm - lineinfile: - path: /etc/php/7.0/fpm/pool.d/www.conf - regexp: 'env[{{ item.key }}]' + path: '/etc/php/{{ fpm_version }}/fpm/pool.d/www.conf' + regexp: '^env\[{{ item.key }}\]' line: 'env[{{ item.key }}] = {{ item.value }}' with_dict: HOSTNAME: '$HOSTNAME' @@ -44,5 +49,6 @@ TMP: /tmp TMPDIR: /tmp TEMP: /tmp + notify: systemctl restart fpm # TODO: comply with warnings from https://malabaricus.trygvis.io/settings/admin/overview diff --git a/ansible/plays/templates/nginx/malabaricus/sites-enabled/default b/ansible/plays/templates/nginx/malabaricus/sites-enabled/default index 7bb9d9a..5d1cec2 100644 --- a/ansible/plays/templates/nginx/malabaricus/sites-enabled/default +++ b/ansible/plays/templates/nginx/malabaricus/sites-enabled/default @@ -19,7 +19,7 @@ upstream php-handler { # include snippets/fastcgi-php.conf; # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; - server unix:/var/run/php/php7.0-fpm.sock; + server unix:/var/run/php/php{{ fpm_version }}-fpm.sock; } # Default server configuration |