⚡: improve nextcloud installation
All checks were successful
ansible-lint / lint-everything (push) Successful in 3s
All checks were successful
ansible-lint / lint-everything (push) Successful in 3s
This commit is contained in:
8
roles/nextcloud/tasks/cron.yml
Normal file
8
roles/nextcloud/tasks/cron.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
- name: Install nextcloud cron
|
||||
ansible.builtin.cron:
|
||||
user: www-data
|
||||
name: nextcloud cron
|
||||
minute: "*/15"
|
||||
job: "/usr/bin/php -f {{ nextcloud_app_home }}/cron.php > /dev/null"
|
@@ -10,5 +10,12 @@
|
||||
ansible.builtin.include_tasks: nextcloud_modules.yml
|
||||
loop: "{{ nextcloud_modules }}"
|
||||
|
||||
- name: Disable nextcloud modules
|
||||
ansible.builtin.include_tasks: nextcloud_disabled_modules.yml
|
||||
loop: "{{ nextcloud_disabled_modules }}"
|
||||
|
||||
- name: Install nextcloud cron
|
||||
ansible.builtin.include_tasks: cron.yml
|
||||
|
||||
- name: Check nextcloud version
|
||||
ansible.builtin.include_tasks: check.yml
|
||||
|
9
roles/nextcloud/tasks/nextcloud_disabled_modules.yml
Normal file
9
roles/nextcloud/tasks/nextcloud_disabled_modules.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: "Disable {{ item.name }} module"
|
||||
become: true
|
||||
become_user: www-data
|
||||
ansible.builtin.command:
|
||||
cmd: "php occ app:disable {{ item.name }}"
|
||||
chdir: "{{ nextcloud_app_home }}"
|
||||
changed_when: false
|
@@ -7,4 +7,3 @@
|
||||
cmd: "php occ app:install {{ item.force | default(false) | ternary('--force', '') }} {{ item.name }}"
|
||||
chdir: "{{ nextcloud_app_home }}"
|
||||
creates: "{{ nextcloud_app_home }}/apps/{{ item.name }}"
|
||||
changed_when: false
|
||||
|
@@ -52,6 +52,7 @@ $CONFIG = array (
|
||||
),
|
||||
),
|
||||
'maintenance' => false,
|
||||
'maintenance_window_start' => 1,
|
||||
'passwordsalt' => '{{ nextcloud_passwordsalt }}',
|
||||
'app_install_overwrite' =>
|
||||
array (
|
||||
|
@@ -22,3 +22,6 @@ nextcloud_modules:
|
||||
- name: tasks
|
||||
- name: user_external
|
||||
force: true
|
||||
|
||||
nextcloud_disabled_modules:
|
||||
- name: photos
|
||||
|
Reference in New Issue
Block a user