finished adding elements to role
This commit is contained in:
parent
422e233527
commit
da2e1a6d78
4 changed files with 52 additions and 8 deletions
13
files/nextcloud.hook
Normal file
13
files/nextcloud.hook
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Update Nextcloud when core or -apps are touched
|
||||
|
||||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = nextcloud
|
||||
Target = nextcloud-app-*
|
||||
|
||||
[Action]
|
||||
Description = Updating Nextcloud installation
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/runuser -u nextcloud -- /usr/bin/php-legacy --php-ini /etc/webapps/nextcloud/php.ini /usr/share/webapps/nextcloud/occ upgrade
|
1
files/profiled-nextcloud.sh
Normal file
1
files/profiled-nextcloud.sh
Normal file
|
@ -0,0 +1 @@
|
|||
export NEXTCLOUD_PHP_CONFIG=/etc/webapps/nextcloud/php.ini
|
|
@ -1,3 +1,7 @@
|
|||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# handlers file for role-nextcloud
|
||||
- name: restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
|
@ -11,6 +11,8 @@
|
|||
- php-legacy-igbinary
|
||||
- php-legacy-redis
|
||||
- php-legacy-fpm
|
||||
- valkey
|
||||
- ffmpeg
|
||||
state: present
|
||||
|
||||
- name: deploy nextcloud php.ini file
|
||||
|
@ -26,6 +28,11 @@
|
|||
group: nextcloud
|
||||
mode: '0700'
|
||||
|
||||
- name: deploy profile.d-nextcloud file
|
||||
ansible.builtin.copy:
|
||||
src: files/profile.d-nextcloud.sh
|
||||
dest: /etc/profile.d/nextcloud.sh
|
||||
|
||||
- name: Create sessions directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/nextcloud/sessions
|
||||
|
@ -65,13 +72,12 @@
|
|||
ansible.builtin.copy:
|
||||
src: files/php-fpm-override.conf
|
||||
dest: /etc/systemd/system/php-fpm-legacy.service.d/override.conf
|
||||
#notify php-fpm-legacy
|
||||
|
||||
- name: deploy nextcloud nginx file
|
||||
ansible.builtin.template:
|
||||
src: templates/nginx-nextcloud.conf
|
||||
dest: /etc/nginx/conf.d/nextcloud.conf
|
||||
#notify nginx
|
||||
notify: restart nginx
|
||||
|
||||
- name: ensure nextcloud-cron override directory exists
|
||||
ansible.builtin.file:
|
||||
|
@ -83,10 +89,30 @@
|
|||
src: files/nextcloud-cron-override.conf
|
||||
dest: /etc/systemd/system/nextcloud-cron.service.d/override.conf
|
||||
|
||||
#- name: ensure nextcloud is running
|
||||
# service:
|
||||
# name: nextcloud
|
||||
# state: started
|
||||
# enabled: yes
|
||||
- name: Create pacman hook directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/pacman.d/hooks
|
||||
state: directory
|
||||
|
||||
# start/enable php-fpm-legacy
|
||||
- name: deploy pacman hook
|
||||
ansible.builtin.copy:
|
||||
src: files/nextcloud.hook
|
||||
dest: /etc/pacman.d/hooks/10-nextcloud.hook
|
||||
|
||||
- name: Add nextcloud user to valkey group
|
||||
ansible.builtin.user:
|
||||
name: nextcloud
|
||||
groups: valkey
|
||||
append: yes
|
||||
|
||||
- name: ensure valkey is running
|
||||
service:
|
||||
name: valkey
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: ensure php-fpm-legacy is running
|
||||
service:
|
||||
name: php-fpm-legacy
|
||||
state: started
|
||||
enabled: yes
|
Loading…
Add table
Reference in a new issue