summaryrefslogtreecommitdiff
path: root/ansible/plays
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-09-19 14:06:13 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-09-19 14:06:13 +0200
commitcb61250ffcabdb68e6b97f3e4b775644f52ab761 (patch)
treebbb378adf2292a442b2160dc31d5836f120028be /ansible/plays
parent2551f4cf7bf226c031091b1e55a4f61be243494d (diff)
downloadinfra-cb61250ffcabdb68e6b97f3e4b775644f52ab761.tar.gz
infra-cb61250ffcabdb68e6b97f3e4b775644f52ab761.tar.bz2
infra-cb61250ffcabdb68e6b97f3e4b775644f52ab761.tar.xz
infra-cb61250ffcabdb68e6b97f3e4b775644f52ab761.zip
nextcloud
Diffstat (limited to 'ansible/plays')
-rw-r--r--ansible/plays/malabaricus.yml24
-rw-r--r--ansible/plays/templates/nginx/malabaricus/sites-enabled/default2
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