From cb61250ffcabdb68e6b97f3e4b775644f52ab761 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 19 Sep 2019 14:06:13 +0200 Subject: nextcloud --- ansible/ansible.cfg | 2 +- ansible/inventory | 2 +- ansible/plays/malabaricus.yml | 24 ++++++++++++++-------- .../nginx/malabaricus/sites-enabled/default | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 06682af..5f7f40b 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -9,4 +9,4 @@ roles_path = roles:thirdparty retry_files_enabled = False strategy_plugins = env/lib/python3.7/site-packages/ansible_mitogen/plugins/strategy -#strategy = mitogen_linear +strategy = mitogen_linear diff --git a/ansible/inventory b/ansible/inventory index 5ae2af7..5663260 100644 --- a/ansible/inventory +++ b/ansible/inventory @@ -13,7 +13,7 @@ all: homepi: ansible_host: homepi.local malabaricus: - ansible_host: 10.13.37.187 # malabaricus.trygvis.io + ansible_host: malabaricus.vpn.trygvis.io conflatorio: ansible_host: conflatorio.trygvis.io akili: 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 -- cgit v1.2.3